Linear Algebra

← Home  ·  A complete university-style course — one 12–14 minute lesson a day at 07:30, from absolute basics to advanced topics.  ·  Daily derivation track →

Lesson 88 of 120 · Module 6: Orthogonality & Least Squares

Module 0 — Vectors & Geometry (14/14)

L1. What linear algebra is: the mathematics of flat things

Module 0  2026-08-05  ·  10:48  ·  practice PDF

Practice problems (3)
Problem 1. A transformation is linear if it keeps the origin fixed and keeps parallel lines parallel. If we slide the entire grid two units to the right, is this a linear transformation?
Reveal solution
  1. Check the origin: the point $(0,0)$ moves to $(2,0)$.
  2. Since the origin does not stay fixed, the rule is violated.

Answer: No

Problem 2. Imagine a transformation that stretches the x-axis by a factor of two but leaves the y-axis alone. Does this keep parallel lines parallel?
Reveal solution
  1. Any two parallel lines have the same slope.
  2. Stretching one axis uniformly changes the slope of all lines by the same ratio.
  3. Therefore, lines that were parallel remain parallel.

Answer: Yes

Problem 3. If a linear transformation collapses a 2D grid onto a single line passing through the origin, what happens to the area of the shapes on that grid?
Reveal solution
  1. A line has zero width.
  2. Any 2D shape flattened into a 1D line loses its area.
  3. The resulting area is zero.

Answer: The area becomes zero

L2. Vectors: arrows, lists of numbers, and why both views matter

Module 0  2026-08-06  ·  10:33  ·  practice PDF

Practice problems (3)
Problem 1. A vector $v$ starts at the origin and has a length of $5$, pointing exactly along the negative $x$-axis. Write $v$ as a component list.
Reveal solution
  1. The vector points along the $x$-axis, so the $y$-component must be $0$.
  2. The vector points in the negative direction, so the $x$-component must be negative.
  3. Since the length is $5$, the $x$-component must be $-5$.
  4. The resulting column vector is $\begin{bmatrix} -5 \\ 0 \end{bmatrix}$.

Answer: v = \begin{bmatrix} -5 \\ 0 \end{bmatrix}

Problem 2. Find the length of the vector $w = \begin{bmatrix} 8 \\ 6 \end{bmatrix}$.
Reveal solution
  1. Identify the components: $x = 8$ and $y = 6$.
  2. Apply the length formula: $\sqrt{8^2 + 6^2}$.
  3. Calculate the squares: $64 + 36 = 100$.
  4. Take the square root: $\sqrt{100} = 10$.

Answer: 10

Problem 3. A vector $u$ has components $\begin{bmatrix} 2 \\ 2 \end{bmatrix}$. If we double the length of the vector while keeping the direction the same, what are the new components?
Reveal solution
  1. The original length is $\sqrt{2^2 + 2^2} = \sqrt{8}$.
  2. To double the length while keeping the direction, we must multiply each component by $2$.
  3. The new $x$-component is $2 \times 2 = 4$.
  4. The new $y$-component is $2 \times 2 = 4$.
  5. The new vector is $\begin{bmatrix} 4 \\ 4 \end{bmatrix}$.

Answer: u_{new} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}

L3. Vector addition and scalar multiplication — geometrically

Module 0  2026-08-07  ·  10:12  ·  practice PDF

Practice problems (3)
Problem 1. Given $u = \begin{bmatrix} 4 \\ -1 \end{bmatrix}$ and $v = \begin{bmatrix} -2 \\ 3 \end{bmatrix}$, compute $u + v$.
Reveal solution
  1. Add the first components: $4 + (-2) = 2$.
  2. Add the second components: $-1 + 3 = 2$.

Answer: \begin{bmatrix} 2 \\ 2 \end{bmatrix}

Problem 2. Given $v = \begin{bmatrix} 3 \\ -5 \end{bmatrix}$, compute $-3v$.
Reveal solution
  1. Multiply the first component by $-3$: $-3 \cdot 3 = -9$.
  2. Multiply the second component by $-3$: $-3 \cdot (-5) = 15$.

Answer: \begin{bmatrix} -9 \\ 15 \end{bmatrix}

Problem 3. Given $a = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $b = \begin{bmatrix} 0 \\ 4 \end{bmatrix}$, compute $2a - b$.
Reveal solution
  1. First, scale $a$ by $2$: $2 \cdot \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 4 \end{bmatrix}$.
  2. Subtract $b$ from the result: $\begin{bmatrix} 2 \\ 4 \end{bmatrix} - \begin{bmatrix} 0 \\ 4 \end{bmatrix} = \begin{bmatrix} 2 - 0 \\ 4 - 4 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}$.

Answer: \begin{bmatrix} 2 \\ 0 \end{bmatrix}

L4. Linear combinations: the most important idea in the course

Module 0  2026-08-08  ·  10:49  ·  practice PDF

Practice problems (3)
Problem 1. Compute the linear combination $3\mathbf{v} + 4\mathbf{w}$ where $\mathbf{v} = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 1 \\ 3 \end{bmatrix}$.
Reveal solution
  1. Scale $\mathbf{v}$ by 3: $3 \cdot \begin{bmatrix} 2 \\ -1 \end{bmatrix} = \begin{bmatrix} 6 \\ -3 \end{bmatrix}$.
  2. Scale $\mathbf{w}$ by 4: $4 \cdot \begin{bmatrix} 1 \\ 3 \end{bmatrix} = \begin{bmatrix} 4 \\ 12 \end{bmatrix}$.
  3. Add the results: $\begin{bmatrix} 6 \\ -3 \end{bmatrix} + \begin{bmatrix} 4 \\ 12 \end{bmatrix} = \begin{bmatrix} 10 \\ 9 \end{bmatrix}$.

Answer: \begin{bmatrix} 10 \\ 9 \end{bmatrix}

Problem 2. Find the resulting vector for the linear combination $-2\mathbf{v} + 3\mathbf{w}$ given $\mathbf{v} = \begin{bmatrix} -1 \\ 4 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}$.
Reveal solution
  1. Scale $\mathbf{v}$ by -2: $-2 \cdot \begin{bmatrix} -1 \\ 4 \end{bmatrix} = \begin{bmatrix} 2 \\ -8 \end{bmatrix}$.
  2. Scale $\mathbf{w}$ by 3: $3 \cdot \begin{bmatrix} 2 \\ 0 \end{bmatrix} = \begin{bmatrix} 6 \\ 0 \end{bmatrix}$.
  3. Add the results: $\begin{bmatrix} 2 \\ -8 \end{bmatrix} + \begin{bmatrix} 6 \\ 0 \end{bmatrix} = \begin{bmatrix} 8 \\ -8 \end{bmatrix}$.

Answer: \begin{bmatrix} 8 \\ -8 \end{bmatrix}

Problem 3. If $\mathbf{v} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$, what weights $c_1$ and $c_2$ are needed to reach the point $\begin{bmatrix} 3 \\ 5 \end{bmatrix}$?
Reveal solution
  1. Set up the equation: $c_1 \begin{bmatrix} 1 \\ 1 \end{bmatrix} + c_2 \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 3 \\ 5 \end{bmatrix}$.
  2. From the first component: $c_1(1) + c_2(0) = 3$, so $c_1 = 3$.
  3. From the second component: $c_1(1) + c_2(1) = 5$.
  4. Substitute $c_1 = 3$ into the second equation: $3 + c_2 = 5$, so $c_2 = 2$.

Answer: c_1 = 3, c_2 = 2

L5. Span: what can you reach?

Module 0  2026-08-09  ·  10:00  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the vector $\begin{bmatrix} 5 \\ 1 \end{bmatrix}$ is in the span of $\mathbf{v} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$. If so, find the weights $c_1$ and $c_2$.
Reveal solution
  1. Set up the equation $c_1 \begin{bmatrix} 1 \\ 0 \end{bmatrix} + c_2 \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix}$.
  2. From the second component, $0 \cdot c_1 + 1 \cdot c_2 = 1$, so $c_2 = 1$.
  3. Substitute $c_2 = 1$ into the first component: $1 \cdot c_1 + 1 \cdot 1 = 5$.
  4. Solve for $c_1$: $c_1 = 5 - 1 = 4$.
  5. Since we found weights $c_1 = 4$ and $c_2 = 1$, the vector is in the span.

Answer: Yes, $c_1 = 4, c_2 = 1$

Problem 2. Describe the span of the vectors $\mathbf{v} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} -6 \\ 4 \end{bmatrix}$. Is it a line or a plane?
Reveal solution
  1. Check if $\mathbf{w}$ is a scalar multiple of $\mathbf{v}$.
  2. Observe that $-2 \cdot \begin{bmatrix} 3 \\ -2 \end{bmatrix} = \begin{bmatrix} -6 \\ 4 \end{bmatrix}$.
  3. Since $\mathbf{w} = -2\mathbf{v}$, the vectors are collinear.
  4. The span of collinear vectors is a line passing through the origin.

Answer: A line

Problem 3. Find a vector in $\mathbb{R}^2$ that is NOT in the span of $\mathbf{v} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 2 \\ 4 \end{bmatrix}$. Explain why.
Reveal solution
  1. Notice that $\mathbf{w} = 2\mathbf{v}$, so the span is the line $y = 2x$.
  2. Any vector where the second component is not twice the first component will be outside the span.
  3. For example, choose $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
  4. Check: $c_1 \begin{bmatrix} 1 \\ 2 \end{bmatrix} + c_2 \begin{bmatrix} 2 \\ 4 \end{bmatrix} = \begin{bmatrix} c_1 + 2c_2 \\ 2c_1 + 4c_2 \end{bmatrix}$.
  5. The second component is always twice the first. Since $1 \neq 2(1)$, the vector $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$ is not in the span.

Answer: Any vector where $y \neq 2x$, e.g., $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$

L6. The dot product I — definition and computation

Module 0  2026-08-10  ·  11:10  ·  practice PDF

Practice problems (3)
Problem 1. Compute the dot product of $\mathbf{u} = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} -3 \\ 4 \end{bmatrix}$.
Reveal solution
  1. Multiply the first components: $5 \times (-3) = -15$.
  2. Multiply the second components: $2 \times 4 = 8$.
  3. Sum the results: $-15 + 8 = -7$.

Answer: -7

Problem 2. Determine if the vectors $\mathbf{u} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} -6 \\ 4 \end{bmatrix}$ are orthogonal.
Reveal solution
  1. Compute the dot product: $(2)(-6) + (3)(4)$.
  2. Calculate the products: $-12 + 12$.
  3. The sum is $0$. Since the dot product is zero, the vectors are orthogonal.

Answer: Yes, they are orthogonal

Problem 3. Compute the dot product of the 3D vectors $\mathbf{u} = \begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} 3 \\ 4 \\ 0 \end{bmatrix}$.
Reveal solution
  1. Multiply first components: $1 \times 3 = 3$.
  2. Multiply second components: $-1 \times 4 = -4$.
  3. Multiply third components: $2 \times 0 = 0$.
  4. Sum the results: $3 + (-4) + 0 = -1$.

Answer: -1

L7. The dot product II — angles, projection, and the geometric meaning

Module 0  2026-08-11  ·  11:10  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the vectors $\mathbf{u} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} -6 \\ 4 \end{bmatrix}$ are perpendicular.
Reveal solution
  1. Compute the dot product: $\mathbf{u} \cdot \mathbf{v} = (2)(-6) + (3)(4)$
  2. Calculate the values: $-12 + 12 = 0$
  3. Since the dot product is $0$, the vectors are perpendicular.

Answer: Yes, they are perpendicular.

Problem 2. Find the angle $\theta$ between $\mathbf{u} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
Reveal solution
  1. Compute the dot product: $\mathbf{u} \cdot \mathbf{v} = (1)(1) + (0)(1) = 1$
  2. Compute magnitudes: $|\mathbf{u}| = \sqrt{1^2 + 0^2} = 1$ and $|\mathbf{v}| = \sqrt{1^2 + 1^2} = \sqrt{2}$
  3. Use the formula: $\cos(\theta) = \frac{1}{1 \cdot \sqrt{2}} = \frac{1}{\sqrt{2}}$
  4. Find the angle: $\theta = \arccos(\frac{1}{\sqrt{2}}) = 45^\circ$

Answer: 45^\circ

Problem 3. Given two unit vectors $\mathbf{u}$ and $\mathbf{v}$, their dot product is $-0.5$. What is the angle between them?
Reveal solution
  1. For unit vectors, $\mathbf{u} \cdot \mathbf{v} = \cos(\theta)$
  2. Set $\cos(\theta) = -0.5$
  3. Find the angle: $\theta = \arccos(-0.5) = 120^\circ$

Answer: 120^\circ

L8. Vector lengths, unit vectors, and distance

Module 0  2026-08-12  ·  10:13  ·  practice PDF

Practice problems (3)
Problem 1. Find the length of the vector $\mathbf{v} = \begin{bmatrix} 8 \\ 6 \end{bmatrix}$.
Reveal solution
  1. Square the components: $8^2 = 64$ and $6^2 = 36$.
  2. Sum the squares: $64 + 36 = 100$.
  3. Take the square root: $\sqrt{100} = 10$.

Answer: 10

Problem 2. Find the unit vector $\mathbf{u}$ in the direction of $\mathbf{v} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
Reveal solution
  1. Calculate the length of $\mathbf{v}$: $|\mathbf{v}| = \sqrt{1^2 + 1^2} = \sqrt{2}$.
  2. Divide each component by the length: $u_1 = 1/\sqrt{2}$ and $u_2 = 1/\sqrt{2}$.

Answer: \begin{bmatrix} 1/\sqrt{2} \\ 1/\sqrt{2} \end{bmatrix}

Problem 3. Calculate the distance between point $A(2, -3)$ and point $B(-1, 1)$.
Reveal solution
  1. Find the difference vector $\mathbf{b} - \mathbf{a}$: $\begin{bmatrix} -1 - 2 \\ 1 - (-3) \end{bmatrix} = \begin{bmatrix} -3 \\ 4 \end{bmatrix}$.
  2. Calculate the length of this vector: $\sqrt{(-3)^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5$.

Answer: 5

L9. The cross product (3D) — definition and geometry

Module 0  2026-08-13  ·  10:32  ·  practice PDF

Practice problems (3)
Problem 1. Compute the cross product of $\mathbf{a} = \begin{pmatrix} 1 \\ 2 \\ 0 \end{pmatrix}$ and $\mathbf{b} = \begin{pmatrix} 0 \\ 1 \\ 3 \end{pmatrix}$.
Reveal solution
  1. The first component is $(2)(3) - (0)(1) = 6$.
  2. The second component is $(0)(0) - (1)(3) = -3$.
  3. The third component is $(1)(1) - (2)(0) = 1$.

Answer: \begin{pmatrix} 6 \\ -3 \\ 1 \end{pmatrix}

Problem 2. Find the area of the parallelogram spanned by $\mathbf{u} = \begin{pmatrix} 2 \\ 0 \\ 0 \end{pmatrix}$ and $\mathbf{v} = \begin{pmatrix} 0 \\ 3 \\ 0 \end{pmatrix}$.
Reveal solution
  1. Compute the cross product: $\mathbf{u} \times \mathbf{v} = \begin{pmatrix} (0)(0) - (0)(3) \\ (0)(0) - (2)(0) \\ (2)(3) - (0)(0) \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 6 \end{pmatrix}$.
  2. The area is the magnitude of this vector: $\sqrt{0^2 + 0^2 + 6^2} = 6$.

Answer: 6

Problem 3. Determine if the vectors $\mathbf{a} = \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}$ and $\mathbf{b} = \begin{pmatrix} -2 \\ 2 \\ -4 \end{pmatrix}$ are parallel using the cross product.
Reveal solution
  1. Compute the first component: $(-1)(-4) - (2)(2) = 4 - 4 = 0$.
  2. Compute the second component: $(2)(-2) - (1)(-4) = -4 + 4 = 0$.
  3. Compute the third component: $(1)(2) - (-1)(-2) = 2 - 2 = 0$.
  4. Since the cross product is the zero vector, the vectors are parallel.

Answer: Yes, they are parallel

L10. Lines in 2D and 3D: parametric and vector forms

Module 0  2026-08-14  ·  10:40  ·  practice PDF

Practice problems (3)
Problem 1. Find the vector equation of the line in 2D that passes through the point $(-2, 5)$ and has a direction vector $\mathbf{v} = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$.
Reveal solution
  1. Identify the starting point $\mathbf{p} = \begin{pmatrix} -2 \\ 5 \end{pmatrix}$.
  2. Identify the direction vector $\mathbf{v} = \begin{pmatrix} 4 \\ 3 \end{pmatrix}$.
  3. Substitute into the formula $\mathbf{r}(t) = \mathbf{p} + t\mathbf{v}$.

Answer: \mathbf{r}(t) = \begin{pmatrix} -2 \\ 5 \end{pmatrix} + t \begin{pmatrix} 4 \\ 3 \end{pmatrix}

Problem 2. Find the parametric equations of the line in 3D passing through the points $A(1, 0, 2)$ and $B(3, -2, 5)$.
Reveal solution
  1. Calculate the direction vector $\mathbf{v} = \mathbf{B} - \mathbf{A} = \begin{pmatrix} 3-1 \\ -2-0 \\ 5-2 \end{pmatrix} = \begin{pmatrix} 2 \\ -2 \\ 3 \end{pmatrix}$.
  2. Use point $A$ as the starting point $\mathbf{p} = \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix}$.
  3. Write the components: $x = 1 + 2t$, $y = 0 - 2t$, $z = 2 + 3t$.

Answer: x = 1 + 2t, y = -2t, z = 2 + 3t

Problem 3. Convert the Cartesian equation $y = -3x + 4$ into a vector equation $\mathbf{r}(t) = \mathbf{p} + t\mathbf{v}$.
Reveal solution
  1. Find a point on the line: if $x = 0$, then $y = 4$, so $\mathbf{p} = \begin{pmatrix} 0 \\ 4 \end{pmatrix}$.
  2. Identify the slope $m = -3$, which means for $\Delta x = 1$, $\Delta y = -3$.
  3. The direction vector is $\mathbf{v} = \begin{pmatrix} 1 \\ -3 \end{pmatrix}$.
  4. Combine into the vector form.

Answer: \mathbf{r}(t) = \begin{pmatrix} 0 \\ 4 \end{pmatrix} + t \begin{pmatrix} 1 \\ -3 \end{pmatrix}

L11. Planes in 3D: normal vectors and equations

Module 0  2026-08-15  ·  10:43  ·  practice PDF

Practice problems (3)
Problem 1. Find the equation of the plane with normal vector $\mathbf{n} = \begin{pmatrix} 2 \\ -3 \\ 1 \end{pmatrix}$ that passes through the point $(4, 1, 5)$.
Reveal solution
  1. Use the point-normal form: $2(x - 4) - 3(y - 1) + 1(z - 5) = 0$.
  2. Expand the terms: $2x - 8 - 3y + 3 + z - 5 = 0$.
  3. Combine constants: $2x - 3y + z - 10 = 0$.
  4. Move the constant to the right side: $2x - 3y + z = 10$.

Answer: 2x - 3y + z = 10

Problem 2. Determine if the vector $\mathbf{v} = \begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}$ is parallel to the plane $3x - y + 2z = 14$.
Reveal solution
  1. Identify the normal vector of the plane: $\mathbf{n} = \begin{pmatrix} 3 \\ -1 \\ 2 \end{pmatrix}$.
  2. A vector is parallel to the plane if it is perpendicular to the normal vector.
  3. Compute the dot product: $\mathbf{n} \cdot \mathbf{v} = (3)(1) + (-1)(2) + (2)(1)$.
  4. Calculate the sum: $3 - 2 + 2 = 3$.
  5. Since the dot product is not zero, the vector is not parallel to the plane.

Answer: No, it is not parallel.

Problem 3. Find the equation of the plane passing through the points $P(2, 0, 0)$, $Q(0, 3, 0)$, and $R(0, 0, 6)$.
Reveal solution
  1. Find two vectors in the plane: $\mathbf{PQ} = Q - P = \begin{pmatrix} -2 \\ 3 \\ 0 \end{pmatrix}$ and $\mathbf{PR} = R - P = \begin{pmatrix} -2 \\ 0 \\ 6 \end{pmatrix}$.
  2. Find the normal vector using the cross product: $\mathbf{n} = \mathbf{PQ} \times \mathbf{PR} = \begin{pmatrix} (3)(6) - (0)(0) \\ (0)(-2) - (-2)(6) \\ (-2)(0) - (3)(-2) \end{pmatrix} = \begin{pmatrix} 18 \\ 12 \\ 6 \end{pmatrix}$.
  3. Simplify the normal vector by dividing by 6: $\mathbf{n}_{simple} = \begin{pmatrix} 3 \\ 2 \\ 1 \end{pmatrix}$.
  4. Use point $P(2, 0, 0)$ in the equation: $3(x - 2) + 2(y - 0) + 1(z - 0) = 0$.
  5. Simplify: $3x - 6 + 2y + z = 0 \implies 3x + 2y + z = 6$.

Answer: 3x + 2y + z = 6

L12. Solving geometry problems with vectors — clinic

Module 0  2026-08-16  ·  12:03  ·  practice PDF

Practice problems (3)
Problem 1. Find the distance from the point $P(2, 3, 4)$ to the plane $x + y + z = 1$.
Reveal solution
  1. Identify the normal vector $\mathbf{n} = [1, 1, 1]$.
  2. Find a point $A$ on the plane, e.g., $A(1, 0, 0)$.
  3. Compute the vector $\mathbf{AP} = [2-1, 3-0, 4-0] = [1, 3, 4]$.
  4. Compute the unit normal $\mathbf{\hat{n}} = \frac{1}{\sqrt{3}}[1, 1, 1]$.
  5. Calculate the distance $d = |\mathbf{AP} \cdot \mathbf{\hat{n}}| = \frac{|1(1) + 3(1) + 4(1)|}{\sqrt{3}} = \frac{8}{\sqrt{3}}$.

Answer: $\frac{8}{\sqrt{3}}$

Problem 2. Find the centroid of a triangle with vertices $A(1, 2, 0)$, $B(5, 0, 2)$, and $C(3, 6, 4)$.
Reveal solution
  1. Sum the x-coordinates: $1 + 5 + 3 = 9$. Divide by 3 to get $3$.
  2. Sum the y-coordinates: $2 + 0 + 6 = 8$. Divide by 3 to get $8/3$.
  3. Sum the z-coordinates: $0 + 2 + 4 = 6$. Divide by 3 to get $2$.

Answer: $(3, 8/3, 2)$

Problem 3. Find the distance from the point $P(1, 1, 1)$ to the line passing through $A(0, 0, 0)$ with direction $\mathbf{v} = [0, 1, 0]$.
Reveal solution
  1. Find the vector $\mathbf{AP} = [1, 1, 1]$.
  2. The unit direction vector is $\mathbf{\hat{v}} = [0, 1, 0]$.
  3. Compute the cross product $\mathbf{AP} \times \mathbf{\hat{v}} = [1(0)-1(1), 1(0)-1(0), 1(1)-1(0)] = [-1, 0, 1]$.
  4. Calculate the magnitude $d = \sqrt{(-1)^2 + 0^2 + 1^2} = \sqrt{2}$.

Answer: $\sqrt{2}$

L13. From arrows to data: vectors as information

Module 0  2026-08-17  ·  11:09  ·  practice PDF

Practice problems (3)
Problem 1. A student has a portfolio of two assets. Asset A is worth $10$ units and Asset B is worth $50$ units. The risk weights for these assets are $0.3$ and $0.7$ respectively. Calculate the total weighted risk using the dot product of the weight vector $\mathbf{w} = [0.3, 0.7]$ and the portfolio vector $\mathbf{p} = [10, 50]$.
Reveal solution
  1. Set up the dot product: $0.3 \times 10 + 0.7 \times 50$
  2. Calculate the first term: $0.3 \times 10 = 3$
  3. Calculate the second term: $0.7 \times 50 = 35$
  4. Sum the results: $3 + 35 = 38$

Answer: 38

Problem 2. Two documents are represented by word-frequency vectors. Document 1 is $\mathbf{d_1} = [3, 0]$ and Document 2 is $\mathbf{d_2} = [2, 2]$. Calculate the cosine similarity between these two documents.
Reveal solution
  1. Find the length of $\mathbf{d_1}$: $|\mathbf{d_1}| = \sqrt{3^2 + 0^2} = 3$
  2. Find the length of $\mathbf{d_2}$: $|\mathbf{d_2}| = \sqrt{2^2 + 2^2} = \sqrt{8} = 2\sqrt{2}$
  3. Compute the dot product: $\mathbf{d_1} \cdot \mathbf{d_2} = (3 \times 2) + (0 \times 2) = 6$
  4. Divide by the product of lengths: $6 / (3 \times 2\sqrt{2}) = 1 / \sqrt{2} \approx 0.707$

Answer: \frac{1}{\sqrt{2}} \approx 0.707

Problem 3. Three points in a 3D feature space are $A = [1, 2, 1]$, $B = [2, 2, 2]$, and $C = [1, 0, 1]$. Which point is closer to $A$: $B$ or $C$?
Reveal solution
  1. Calculate distance $AB$: $\sqrt{(2-1)^2 + (2-2)^2 + (2-1)^2} = \sqrt{1^2 + 0^2 + 1^2} = \sqrt{2} \approx 1.414$
  2. Calculate distance $AC$: $\sqrt{(1-1)^2 + (0-2)^2 + (1-1)^2} = \sqrt{0^2 + (-2)^2 + 0^2} = \sqrt{4} = 2$
  3. Compare the distances: $\sqrt{2} < 2$

Answer: Point B is closer to A

L14. Module 0 review + self-test

Module 0  2026-08-18  ·  11:54  ·  practice PDF

Practice problems (3)
Problem 1. Find the angle $\theta$ between the vectors $\mathbf{u} = [1, 1, 0]$ and $\mathbf{v} = [0, 1, 1]$.
Reveal solution
  1. Compute the dot product: $\mathbf{u} \cdot \mathbf{v} = (1)(0) + (1)(1) + (0)(1) = 1$.
  2. Compute the lengths: $|\mathbf{u}| = \sqrt{1^2 + 1^2 + 0^2} = \sqrt{2}$ and $|\mathbf{v}| = \sqrt{0^2 + 1^2 + 1^2} = \sqrt{2}$.
  3. Use the formula $\cos(\theta) = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{u}||\mathbf{v}|} = \frac{1}{\sqrt{2}\sqrt{2}} = \frac{1}{2}$.
  4. Find the angle: $\theta = \arccos(1/2) = 60^\circ$.

Answer: 60^\circ

Problem 2. Find the area of the triangle with vertices $A(0,0,0)$, $B(2,0,0)$, and $C(0,3,0)$.
Reveal solution
  1. Find vectors $\vec{AB} = [2, 0, 0]$ and $\vec{AC} = [0, 3, 0]$.
  2. Compute the cross product: $\vec{AB} \times \vec{AC} = [0, 0, (2)(3) - (0)(0)] = [0, 0, 6]$.
  3. The length of the cross product is $\sqrt{0^2 + 0^2 + 6^2} = 6$.
  4. The area of the triangle is half the area of the parallelogram: $6 / 2 = 3$.

Answer: 3

Problem 3. A plane has the equation $2x - y + 2z = 4$. Find the shortest distance from the point $P(1, 2, 1)$ to this plane.
Reveal solution
  1. Identify the normal vector $\mathbf{n} = [2, -1, 2]$.
  2. Find the length of the normal: $|\mathbf{n}| = \sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{9} = 3$.
  3. Find a point $A$ on the plane. If $y=0, z=0$, then $2x=4 \implies x=2$. So $A(2, 0, 0)$.
  4. Compute the vector $\vec{AP} = P - A = [1-2, 2-0, 1-0] = [-1, 2, 1]$.
  5. The distance is $d = \frac{|\vec{AP} \cdot \mathbf{n}|}{|\mathbf{n}|} = \frac{|(-1)(2) + (2)(-1) + (1)(2)|}{3} = \frac{|-2 - 2 + 2|}{3} = \frac{2}{3}$.

Answer: 2/3

Module 1 — Systems of Linear Equations (13/13)

L15. Systems of equations: the row picture and the column picture

Module 1  2026-08-19  ·  11:20  ·  practice PDF

Practice problems (3)
Problem 1. Given the system $\begin{cases} 3x + 2y = 7 \\ 4x - y = 2 \end{cases}$, write the corresponding vector equation for the column picture.
Reveal solution
  1. Identify the coefficients of $x$ as the first column vector: $\mathbf{v}_1 = \begin{pmatrix} 3 \\ 4 \end{pmatrix}$.
  2. Identify the coefficients of $y$ as the second column vector: $\mathbf{v}_2 = \begin{pmatrix} 2 \\ -1 \end{pmatrix}$.
  3. Identify the constants on the right side as the target vector: $\mathbf{b} = \begin{pmatrix} 7 \\ 2 \end{pmatrix}$.
  4. Combine them into the form $x\mathbf{v}_1 + y\mathbf{v}_2 = \mathbf{b}$.

Answer: x \begin{pmatrix} 3 \\ 4 \end{pmatrix} + y \begin{pmatrix} 2 \\ -1 \end{pmatrix} = \begin{pmatrix} 7 \\ 2 \end{pmatrix}

Problem 2. Consider the system $\begin{cases} x + y = 2 \\ 2x + 2y = 4 \end{cases}$. Describe the row picture and the column picture.
Reveal solution
  1. In the row picture, the second equation is just twice the first, so both equations describe the same line $x + y = 2$.
  2. In the column picture, the columns are $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$.
  3. The target vector is $\begin{pmatrix} 2 \\ 4 \end{pmatrix}$, which is exactly twice the first column.
  4. Since the columns are dependent and the target is in their span, there are infinite solutions.

Answer: Both rows describe the same line; both columns are the same vector and the target is a multiple of them.

Problem 3. Find the solution $(x, y)$ for the system $\begin{cases} 2x + y = 5 \\ x - y = 1 \end{cases}$ using the column picture logic.
Reveal solution
  1. Write as $x \begin{pmatrix} 2 \\ 1 \end{pmatrix} + y \begin{pmatrix} 1 \\ -1 \end{pmatrix} = \begin{pmatrix} 5 \\ 1 \end{pmatrix}$.
  2. Try small integers: if $x = 2$, then $2 \begin{pmatrix} 2 \\ 1 \end{pmatrix} = \begin{pmatrix} 4 \\ 2 \end{pmatrix}$.
  3. We need $\begin{pmatrix} 5 \\ 1 \end{pmatrix} - \begin{pmatrix} 4 \\ 2 \end{pmatrix} = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$.
  4. This is exactly $1$ times the second column vector, so $y = 1$.
  5. Check: $2(2) + 1 = 5$ and $2 - 1 = 1$.

Answer: x = 2, y = 1

L16. When do solutions exist? Geometric intuition

Module 1  2026-08-20  ·  10:21  ·  practice PDF

Practice problems (3)
Problem 1. Determine the number of solutions for the system: $3x - 2y = 5$ and $6x - 4y = 10$. Explain your reasoning geometrically.
Reveal solution
  1. Observe the coefficients of the first equation: $3$ and $-2$.
  2. Observe the coefficients of the second equation: $6$ and $-4$.
  3. Notice that $6 = 2 \times 3$ and $-4 = 2 \times (-2)$.
  4. Check the constants: $10 = 2 \times 5$.
  5. Since the entire second equation is exactly twice the first, the lines are coincident.

Answer: Infinitely many solutions

Problem 2. Consider the system $x + y = 2$ and $x + y = 5$. How many solutions exist, and why?
Reveal solution
  1. The normal vectors for both lines are $[1, 1]$.
  2. Since the normal vectors are identical, the lines are parallel.
  3. The constants $2$ and $5$ are different, so the lines are distinct.
  4. Parallel distinct lines never intersect.

Answer: No solution

Problem 3. In 3D, if three planes are all parallel to each other and distinct, how many solutions does the system have?
Reveal solution
  1. A solution must be a point that lies on all three planes simultaneously.
  2. If plane 1 and plane 2 are parallel and distinct, they have no points in common.
  3. Therefore, there can be no point that lies on all three planes.

Answer: No solution

L17. Gaussian elimination I — the algorithm

Module 1  2026-08-21  ·  10:45  ·  practice PDF

Practice problems (3)
Problem 1. Solve the system using Gaussian elimination: $2x + 3y = 8$ and $x - y = -3$.
Reveal solution
  1. Write the augmented matrix: $\left( \begin{array}{cc|c} 2 & 3 & 8 \\ 1 & -1 & -3 \end{array} \right)$
  2. Swap rows to get a pivot of 1: $\left( \begin{array}{cc|c} 1 & -1 & -3 \\ 2 & 3 & 8 \end{array} \right)$
  3. Eliminate below pivot: $R_2 \leftarrow R_2 - 2R_1$ gives $\left( \begin{array}{cc|c} 1 & -1 & -3 \\ 0 & 5 & 14 \end{array} \right)$
  4. Solve for $y$: $5y = 14 \implies y = 2.8$
  5. Back-substitute for $x$: $x - 2.8 = -3 \implies x = -0.2$

Answer: x = -0.2, y = 2.8

Problem 2. Transform the following system into upper triangular form using row operations: $x + y + z = 6$, $2x - y + z = 3$, and $x + 2y - z = 2$.
Reveal solution
  1. Augmented matrix: $\left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 2 \end{array} \right)$
  2. Clear first column: $R_2 \leftarrow R_2 - 2R_1$ and $R_3 \leftarrow R_3 - R_1$ gives $\left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & -2 & -4 \end{array} \right)$
  3. Swap $R_2$ and $R_3$ for easier pivot: $\left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -4 \\ 0 & -3 & -1 & -9 \end{array} \right)$
  4. Clear second column: $R_3 \leftarrow R_3 + 3R_2$ gives $\left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -4 \\ 0 & 0 & -7 & -21 \end{array} \right)$

Answer: \left( \begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -4 \\ 0 & 0 & -7 & -21 \end{array} \right)

Problem 3. Solve the system from the previous problem using back-substitution.
Reveal solution
  1. From the last row: $-7z = -21 \implies z = 3$
  2. From the second row: $y - 2(3) = -4 \implies y - 6 = -4 \implies y = 2$
  3. From the first row: $x + 2 + 3 = 6 \implies x + 5 = 6 \implies x = 1$

Answer: x = 1, y = 2, z = 3

L18. Gaussian elimination II — harder systems, pivots

Module 1  2026-08-22  ·  10:59  ·  practice PDF

Practice problems (3)
Problem 1. Solve the following system using Gaussian elimination: $x + 2y - z = 3$, $y + 4z = 2$, $2x + 5y + 2z = 10$.
Reveal solution
  1. Write the augmented matrix: $[[1, 2, -1, 3], [0, 1, 4, 2], [2, 5, 2, 10]]$.
  2. Eliminate $x$ from row 3: $R_3 \leftarrow R_3 - 2R_1$ gives $[[1, 2, -1, 3], [0, 1, 4, 2], [0, 1, 4, 4]]$.
  3. Eliminate $y$ from row 3: $R_3 \leftarrow R_3 - R_2$ gives $[[1, 2, -1, 3], [0, 1, 4, 2], [0, 0, 0, 2]]$.
  4. Observe the third row: $0x + 0y + 0z = 2$, which is impossible.

Answer: No solution (Inconsistent system)

Problem 2. Solve the system: $0x + y + z = 2$, $x + 2y + z = 4$, $2x + 7y + z = 19$.
Reveal solution
  1. Swap $R_1$ and $R_2$ to get a pivot in the first column: $[[1, 2, 1, 4], [0, 1, 1, 2], [2, 7, 1, 19]]$.
  2. Eliminate $x$ from row 3: $R_3 \leftarrow R_3 - 2R_1$ gives $[[1, 2, 1, 4], [0, 1, 1, 2], [0, 3, -1, 11]]$.
  3. Eliminate $y$ from row 3: $R_3 \leftarrow R_3 - 3R_2$ gives $[[1, 2, 1, 4], [0, 1, 1, 2], [0, 0, -4, 5]]$.
  4. Back-substitute: $-4z = 5 \implies z = -1.25$.
  5. Substitute $z$ into $R_2$: $y - 1.25 = 2 \implies y = 3.25$.
  6. Substitute $y, z$ into $R_1$: $x + 6.5 - 1.25 = 4 \implies x = -1.25$.

Answer: x = -1.25, y = 3.25, z = -1.25

Problem 3. Solve the system: $x + y + z = 6$, $2x + 4y - 2z = 2$, $3x + 5y + 0z = 18$.
Reveal solution
  1. Augmented matrix: $[[1, 1, 1, 6], [2, 4, -2, 2], [3, 5, 0, 18]]$.
  2. Clear Col 1: $R_2 \leftarrow R_2 - 2R_1$ and $R_3 \leftarrow R_3 - 3R_1$ gives $[[1, 1, 1, 6], [0, 2, -4, -10], [0, 2, -3, 0]]$.
  3. Clear Col 2: $R_3 \leftarrow R_3 - R_2$ gives $[[1, 1, 1, 6], [0, 2, -4, -10], [0, 0, 1, 10]]$.
  4. Back-substitute: $z = 10$.
  5. Substitute $z$ into $R_2$: $2y - 40 = -10 \implies 2y = 30 \implies y = 15$.
  6. Substitute $y, z$ into $R_1$: $x + 15 + 10 = 6 \implies x + 25 = 6 \implies x = -19$.

Answer: x = -19, y = 15, z = 10

L19. Row echelon form and reduced row echelon form

Module 1  2026-08-23  ·  10:30  ·  practice PDF

Practice problems (3)
Problem 1. Transform the following augmented matrix into Reduced Row Echelon Form: $\begin{pmatrix} 1 & 3 & | & 7 \\ 2 & 8 & | & 17 \end{pmatrix}$
Reveal solution
  1. Step 1: Eliminate the entry below the first pivot. $R_2 \leftarrow R_2 - 2R_1$ gives $\begin{pmatrix} 1 & 3 & | & 7 \\ 0 & 2 & | & 3 \end{pmatrix}$.
  2. Step 2: Scale the second row to make the pivot one. $R_2 \leftarrow 0.5R_2$ gives $\begin{pmatrix} 1 & 3 & | & 7 \\ 0 & 1 & | & 1.5 \end{pmatrix}$.
  3. Step 3: Eliminate the entry above the second pivot. $R_1 \leftarrow R_1 - 3R_2$ gives $\begin{pmatrix} 1 & 0 & | & 2.5 \\ 0 & 1 & | & 1.5 \end{pmatrix}$.

Answer: \begin{pmatrix} 1 & 0 & | & 2.5 \\ 0 & 1 & | & 1.5 \end{pmatrix}

Problem 2. Determine if the following matrix is in REF, RREF, or neither: $\begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 0 \end{pmatrix}$
Reveal solution
  1. Step 1: Check REF conditions. All zero rows are at the bottom. The leading entry of row 2 is to the right of row 1. All entries below pivots are zero. It is in REF.
  2. Step 2: Check RREF conditions. All pivots are one. The pivot in column 1 is the only non-zero entry in column 1. The pivot in column 2 is the only non-zero entry in column 2.

Answer: RREF

Problem 3. Find the solution to the system represented by the RREF matrix $\begin{pmatrix} 1 & 0 & 2 & | & 4 \\ 0 & 1 & -1 & | & 3 \\ 0 & 0 & 0 & | & 0 \end{pmatrix}$. Express the solution in terms of a free variable $z$.
Reveal solution
  1. Step 1: Identify pivots. Pivots are in columns 1 and 2. Column 3 has no pivot, so $z$ is a free variable.
  2. Step 2: Write the equations from the rows. Row 1: $x + 2z = 4$. Row 2: $y - z = 3$.
  3. Step 3: Solve for pivot variables. $x = 4 - 2z$ and $y = 3 + z$.

Answer: x = 4 - 2z, y = 3 + z, z \text{ is free}

L20. Free variables and infinite solution families

Module 1  2026-08-24  ·  11:39  ·  practice PDF

Practice problems (3)
Problem 1. Find the parametric solution for the system represented by the equation $2x + 3y = 12$.
Reveal solution
  1. Identify that there is one equation and two variables, so one variable must be free.
  2. Let $y = t$.
  3. Solve for $x$: $2x = 12 - 3t$, so $x = 6 - 1.5t$.
  4. Write in vector form: $\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 6 \\ 0 \end{pmatrix} + t \begin{pmatrix} -1.5 \\ 1 \end{pmatrix}$.

Answer: \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 6 \\ 0 \end{pmatrix} + t \begin{pmatrix} -1.5 \\ 1 \end{pmatrix}

Problem 2. Given the RREF matrix $\begin{pmatrix} 1 & 2 & 0 & 4 \\ 0 & 0 & 1 & 5 \\ 0 & 0 & 0 & 0 \end{pmatrix}$, find the general solution in parametric vector form.
Reveal solution
  1. Pivots are in columns 1 and 3. Column 2 is free.
  2. Let $x_2 = t$.
  3. From row 2: $x_3 = 5$.
  4. From row 1: $x_1 + 2t = 4$, so $x_1 = 4 - 2t$.
  5. The solution vector is $\begin{pmatrix} 4-2t \\ t \\ 5 \end{pmatrix} = \begin{pmatrix} 4 \\ 0 \\ 5 \end{pmatrix} + t \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix}$.

Answer: \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} 4 \\ 0 \\ 5 \end{pmatrix} + t \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix}

Problem 3. A system of 3 equations with 5 variables is consistent and has 2 pivots. What is the dimension of the solution set, and how many parameters are needed to describe it?
Reveal solution
  1. The number of variables is 5.
  2. The number of pivots is 2.
  3. The number of free variables is $5 - 2 = 3$.
  4. The dimension of the solution set is equal to the number of free variables.

Answer: Dimension is 3; 3 parameters are needed.

L21. Inconsistent systems: recognising no-solution cases

Module 1  2026-08-25  ·  12:24  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the following system is consistent or inconsistent: $x + 3y = 4$ and $2x + 6y = 10$.
Reveal solution
  1. Write the augmented matrix: $\left[ \begin{array}{cc|c} 1 & 3 & 4 \\ 2 & 6 & 10 \end{array} \right]$
  2. Perform $R_2 \leftarrow R_2 - 2R_1$: $2 - 2(1) = 0$, $6 - 2(3) = 0$, $10 - 2(4) = 2$.
  3. The resulting matrix is $\left[ \begin{array}{cc|c} 1 & 3 & 4 \\ 0 & 0 & 2 \end{array} \right]$.
  4. The second row represents $0 = 2$, which is a contradiction.

Answer: Inconsistent

Problem 2. A $3 \times 3$ system has an augmented matrix in RREF where the third row is $[0 \ 0 \ 0 \ | \ 1]$. Is the system consistent? Explain why.
Reveal solution
  1. The row $[0 \ 0 \ 0 \ | \ 1]$ translates to the equation $0x + 0y + 0z = 1$.
  2. This simplifies to $0 = 1$.
  3. Since $0$ can never equal $1$, there are no values of $x, y, z$ that satisfy this equation.

Answer: Inconsistent

Problem 3. Consider the system $x + y = 2$, $y + z = 2$, and $x + z = 2$. Is this system consistent? If so, find the solution.
Reveal solution
  1. Augmented matrix: $\left[ \begin{array}{ccc|c} 1 & 1 & 0 & 2 \\ 0 & 1 & 1 & 2 \\ 1 & 0 & 1 & 2 \end{array} \right]$
  2. Perform $R_3 \leftarrow R_3 - R_1$: $\left[ \begin{array}{ccc|c} 1 & 1 & 0 & 2 \\ 0 & 1 & 1 & 2 \\ 0 & -1 & 1 & 0 \end{array} \right]$
  3. Perform $R_3 \leftarrow R_3 + R_2$: $\left[ \begin{array}{ccc|c} 1 & 1 & 0 & 2 \\ 0 & 1 & 1 & 2 \\ 0 & 0 & 2 & 2 \end{array} \right]$
  4. The system is consistent because there is no row of the form $[0 \ 0 \ 0 \ | \ k]$.
  5. Back-substitute: $2z = 2 \implies z = 1$. Then $y + 1 = 2 \implies y = 1$. Then $x + 1 = 2 \implies x = 1$.

Answer: Consistent; solution is $(1, 1, 1)$

L22. Homogeneous systems and why they matter

Module 1  2026-08-26  ·  12:27  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the system $\begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 1 & 0 \end{bmatrix} \mathbf{x} = \mathbf{0}$ has only the trivial solution or infinitely many solutions.
Reveal solution
  1. Write the augmented matrix and perform row reduction.
  2. Row 2 minus 2 times Row 1 gives $[0 \ 0 \ 0]$.
  3. Row 3 minus Row 1 gives $[0 \ -1 \ -1]$.
  4. The RREF is $\begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  5. There is a free variable $z$, so there are infinitely many solutions.

Answer: Infinitely many solutions

Problem 2. Given that $\mathbf{v}_1 = [1, 2, -1]^T$ and $\mathbf{v}_2 = [0, 1, 3]^T$ are solutions to a homogeneous system $A\mathbf{x} = \mathbf{0}$, find a third non-zero solution $\mathbf{v}_3$.
Reveal solution
  1. Use the superposition principle: any linear combination of solutions is a solution.
  2. Let $\mathbf{v}_3 = \mathbf{v}_1 + \mathbf{v}_2$.
  3. Compute the sum: $[1+0, 2+1, -1+3]^T = [1, 3, 2]^T$.

Answer: $[1, 3, 2]^T$ (or any other linear combination)

Problem 3. Find the general solution in parametric vector form for the system $x + 2y - z = 0$ and $2x + 4y - 2z = 0$.
Reveal solution
  1. The second equation is a multiple of the first, so we have only one independent equation: $x + 2y - z = 0$.
  2. Identify $x$ as the pivot variable and $y, z$ as free variables.
  3. Solve for $x$: $x = -2y + z$.
  4. Write in vector form: $\mathbf{x} = y[-2, 1, 0]^T + z[1, 0, 1]^T$.

Answer: $\mathbf{x} = y \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} + z \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}$

L23. Elimination clinic — mixed practice

Module 1  2026-08-27  ·  10:31  ·  practice PDF

Practice problems (3)
Problem 1. Solve the system: $x + 2y + z = 4$, $3x - y + 2z = 1$, and $4x + y + 3z = 5$.
Reveal solution
  1. Set up the augmented matrix $[[1, 2, 1, 4], [3, -1, 2, 1], [4, 1, 3, 5]]$.
  2. Perform $R2 \leftarrow R2 - 3R1$ and $R3 \leftarrow R3 - 4R1$ to get $[[1, 2, 1, 4], [0, -7, -1, -11], [0, -7, -1, -11]]$.
  3. Perform $R3 \leftarrow R3 - R2$ to get $[[1, 2, 1, 4], [0, -7, -1, -11], [0, 0, 0, 0]]$.
  4. Identify $z$ as a free variable. Let $z = t$.
  5. From $R2$, $-7y - t = -11$, so $y = (11 - t)/7$.
  6. From $R1$, $x = 4 - 2y - z = 4 - 2(11-t)/7 - t = (28 - 22 + 2t - 7t)/7 = (6 - 5t)/7$.

Answer: \mathbf{x} = \begin{bmatrix} 6/7 \\ 11/7 \\ 0 \end{bmatrix} + t \begin{bmatrix} -5/7 \\ -1/7 \\ 1 \end{bmatrix}

Problem 2. Determine if the system $x + y = 2$ and $2x + 2y = 5$ is consistent.
Reveal solution
  1. Set up the augmented matrix $[[1, 1, 2], [2, 2, 5]]$.
  2. Perform $R2 \leftarrow R2 - 2R1$.
  3. The resulting matrix is $[[1, 1, 2], [0, 0, 1]]$.
  4. The second row represents the equation $0 = 1$, which is a contradiction.

Answer: Inconsistent (No solution)

Problem 3. Find the non-trivial solutions to the homogeneous system $x - 2y + z = 0$ and $2x - 4y + 2z = 0$.
Reveal solution
  1. Set up the coefficient matrix $[[1, -2, 1], [2, -4, 2]]$.
  2. Perform $R2 \leftarrow R2 - 2R1$ to get $[[1, -2, 1], [0, 0, 0]]$.
  3. Variables $y$ and $z$ are free. Let $y = s$ and $z = t$.
  4. Then $x = 2s - t$.

Answer: \mathbf{x} = s \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} + t \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix}

L24. Applications I: network flows and circuits

Module 1  2026-08-28  ·  13:31  ·  practice PDF

Practice problems (3)
Problem 1. A network has three nodes. Node 1: external input of $8$, flows $x_1$ and $x_2$ leave. Node 2: $x_1$ enters, $x_3$ leaves. Node 3: $x_2$ and $x_3$ enter, external output of $8$. Find the general solution.
Reveal solution
  1. Node 1: $x_1 + x_2 = 8$
  2. Node 2: $x_1 = x_3$
  3. Node 3: $x_2 + x_3 = 8$
  4. The third equation is redundant. From node 2, $x_1 = x_3$. Substituting into node 1, $x_3 + x_2 = 8$, which matches node 3.
  5. Let $x_3 = t$. Then $x_1 = t$ and $x_2 = 8 - t$.

Answer: $x_1 = t, x_2 = 8 - t, x_3 = t$

Problem 2. In a circuit junction, current $I_1$ and $I_2$ enter, while $I_3$ and $I_4$ leave. If $I_1 = 5\text{A}$ and $I_2 = 3\text{A}$, and we know $I_3 = 2I_4$, find the values of $I_3$ and $I_4$.
Reveal solution
  1. Conservation at node: $I_1 + I_2 = I_3 + I_4$
  2. Substitute knowns: $5 + 3 = I_3 + I_4 \implies I_3 + I_4 = 8$
  3. Substitute constraint: $2I_4 + I_4 = 8 \implies 3I_4 = 8$
  4. Solve for $I_4$: $I_4 = 8/3\text{A}$
  5. Solve for $I_3$: $I_3 = 2(8/3) = 16/3\text{A}$

Answer: $I_3 = 16/3\text{A}, I_4 = 8/3\text{A}$

Problem 3. A network has four nodes. Node 1: input $10$, flows $x_1, x_2$ leave. Node 2: $x_1$ enters, $x_3, x_4$ leave. Node 3: $x_2, x_3$ enter, $x_5$ leaves. Node 4: $x_4, x_5$ enter, output $10$. Determine if the system has a unique solution or free variables.
Reveal solution
  1. Eq 1: $x_1 + x_2 = 10$
  2. Eq 2: $x_1 - x_3 - x_4 = 0$
  3. Eq 3: $x_2 + x_3 - x_5 = 0$
  4. Eq 4: $x_4 + x_5 = 10$
  5. Matrix: $[[1, 1, 0, 0, 0, 10], [1, 0, -1, -1, 0, 0], [0, 1, 1, 0, -1, 0], [0, 0, 0, 1, 1, 10]]$.
  6. Row reduction shows the 4th equation is a linear combination of the first three.
  7. With 5 variables and 3 independent equations, there are $5 - 3 = 2$ free variables.

Answer: The system has infinitely many solutions with 2 free variables.

L25. Applications II: balancing chemical equations, fitting polynomials

Module 1  2026-08-29  ·  11:29  ·  practice PDF

Practice problems (3)
Problem 1. Find the quadratic polynomial $y = ax^2 + bx + c$ that passes through the points $(0,1)$, $(1,3)$, and $(2,7)$.
Reveal solution
  1. Plug in $(0,1)$: $a(0)^2 + b(0) + c = 1 \implies c = 1$.
  2. Plug in $(1,3)$: $a(1)^2 + b(1) + 1 = 3 \implies a + b = 2$.
  3. Plug in $(2,7)$: $a(2)^2 + b(2) + 1 = 7 \implies 4a + 2b = 6$.
  4. Divide the last equation by 2: $2a + b = 3$.
  5. Subtract $(a + b = 2)$ from $(2a + b = 3)$ to get $a = 1$.
  6. Substitute $a = 1$ into $a + b = 2$ to get $b = 1$.

Answer: y = x^2 + x + 1

Problem 2. A chemical reaction is represented by the unbalanced equation: $x_1 \text{C}_3\text{H}_8 + x_2 \text{O}_2 \to x_3 \text{C}_3\text{H}_6\text{O}_3 + x_4 \text{H}_2\text{O}$. Set up the homogeneous system of equations for Carbon, Hydrogen, and Oxygen.
Reveal solution
  1. Carbon: $3x_1 = 3x_3 \implies 3x_1 - 3x_3 = 0$.
  2. Hydrogen: $8x_1 = 6x_3 + 2x_4 \implies 8x_1 - 6x_3 - 2x_4 = 0$.
  3. Oxygen: $2x_2 = 3x_3 + x_4 \implies 2x_2 - 3x_3 - x_4 = 0$.

Answer: 3x_1 - 3x_3 = 0, 8x_1 - 6x_3 - 2x_4 = 0, 2x_2 - 3x_3 - x_4 = 0

Problem 3. Determine if a unique parabola $y = ax^2 + bx + c$ can be fit through the points $(1,2)$, $(2,4)$, and $(1,5)$. Explain why or why not using linear algebra concepts.
Reveal solution
  1. The points $(1,2)$ and $(1,5)$ have the same x-coordinate but different y-coordinates.
  2. This means for $x=1$, the system requires $a+b+c=2$ and $a+b+c=5$.
  3. Subtracting these equations gives $0 = 3$, which is a contradiction.
  4. The system is inconsistent, meaning no such parabola exists.

Answer: No, the system is inconsistent because the points $(1,2)$ and $(1,5)$ violate the vertical line test for functions.

L26. Elimination as matrix multiplication — a first look ahead

Module 1  2026-08-30  ·  11:07  ·  practice PDF

Practice problems (3)
Problem 1. Find the $3 \times 3$ elementary matrix $E$ that performs the operation $R_3 \leftarrow R_3 - 4 R_2$ on a matrix $A$.
Reveal solution
  1. Start with the $3 \times 3$ identity matrix $I$.
  2. The operation affects row 3 using row 2.
  3. Place the multiplier $-4$ in the position corresponding to row 3, column 2.
  4. Keep all other entries of the identity matrix the same.

Answer: \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -4 & 1 \end{pmatrix}

Problem 2. Given $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$, find the result of $EA$ where $E = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$.
Reveal solution
  1. Recognize that $E$ is the elementary matrix for swapping row 1 and row 2.
  2. Apply the swap to the rows of $A$.
  3. The first row of $A$ becomes the second row of the result.
  4. The second row of $A$ becomes the first row of the result.

Answer: \begin{pmatrix} 3 & 4 \\ 1 & 2 \end{pmatrix}

Problem 3. If $E_1$ scales row 1 by $5$ and $E_2$ replaces row 2 with $R_2 + 2 R_1$, what is the single matrix $E_{total} = E_2 E_1$ for a $2 \times 2$ system?
Reveal solution
  1. Write $E_1 = \begin{pmatrix} 5 & 0 \\ 0 & 1 \end{pmatrix}$.
  2. Write $E_2 = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}$.
  3. Compute the product $E_2 E_1$.
  4. Top row: $(1 \cdot 5) + (0 \cdot 0) = 5$ and $(1 \cdot 0) + (0 \cdot 1) = 0$.
  5. Bottom row: $(2 \cdot 5) + (1 \cdot 0) = 10$ and $(2 \cdot 0) + (1 \cdot 1) = 1$.

Answer: \begin{pmatrix} 5 & 0 \\ 10 & 1 \end{pmatrix}

L27. Module 1 review + self-test

Module 1  2026-08-31  ·  12:12  ·  practice PDF

Practice problems (3)
Problem 1. Solve the system represented by the augmented matrix $\begin{bmatrix} 1 & 2 & 1 & | & 4 \\ 0 & 1 & -1 & | & 1 \\ 2 & 5 & 2 & | & 9 \end{bmatrix}$.
Reveal solution
  1. Step 1: Clear the first column. $R_3 \leftarrow R_3 - 2R_1$ gives $\begin{bmatrix} 1 & 2 & 1 & | & 4 \\ 0 & 1 & -1 & | & 1 \\ 0 & 1 & 0 & | & 1 \end{bmatrix}$.
  2. Step 2: Clear the second column. $R_3 \leftarrow R_3 - R_2$ gives $\begin{bmatrix} 1 & 2 & 1 & | & 4 \\ 0 & 1 & -1 & | & 1 \\ 0 & 0 & 1 & | & 0 \end{bmatrix}$.
  3. Step 3: Back substitute. From $R_3$, $z = 0$.
  4. Step 4: From $R_2$, $y - 0 = 1$, so $y = 1$.
  5. Step 5: From $R_1$, $x + 2(1) + 0 = 4$, so $x = 2$.

Answer: (2, 1, 0)

Problem 2. Determine if the system $\begin{bmatrix} 1 & 1 & | & 2 \\ 2 & 2 & | & 5 \end{bmatrix}$ is consistent.
Reveal solution
  1. Step 1: Perform $R_2 \leftarrow R_2 - 2R_1$.
  2. Step 2: The resulting matrix is $\begin{bmatrix} 1 & 1 & | & 2 \\ 0 & 0 & | & 1 \end{bmatrix}$.
  3. Step 3: The second row implies $0 = 1$, which is a contradiction.

Answer: Inconsistent (no solution)

Problem 3. Find the general solution for $\begin{bmatrix} 1 & 3 & | & 5 \\ 0 & 0 & | & 0 \end{bmatrix}$.
Reveal solution
  1. Step 1: Identify pivots. The only pivot is in the first column.
  2. Step 2: Identify free variables. The second column has no pivot, so $y$ is free.
  3. Step 3: Express $x$ in terms of $y$. $x + 3y = 5 \implies x = 5 - 3y$.

Answer: x = 5 - 3y, y is free

Module 2 — Matrix Algebra (16/16)

L28. Matrices as objects: notation, shapes, special matrices

Module 2  2026-09-01  ·  11:58  ·  practice PDF

Practice problems (3)
Problem 1. Given the matrix $A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$, what is the value of the entry $a_{23}$?
Reveal solution
  1. Locate the second row of the matrix, which is $[4, 5, 6]$.
  2. Locate the third column of that row, which is the value $6$.

Answer: 6

Problem 2. Write out the $3 \times 3$ diagonal matrix $D$ where $d_{11} = 2$, $d_{22} = -1$, and $d_{33} = 4$.
Reveal solution
  1. Start with a $3 \times 3$ matrix of zeros.
  2. Place $2$ at row $1$, column $1$.
  3. Place $-1$ at row $2$, column $2$.
  4. Place $4$ at row $3$, column $3$.

Answer: \begin{bmatrix} 2 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 4 \end{bmatrix}

Problem 3. If a matrix $M$ is a $4 \times 2$ matrix, how many total entries does it have, and is it a square matrix?
Reveal solution
  1. The total number of entries is the product of the number of rows and columns: $4 \times 2 = 8$.
  2. A square matrix must have the same number of rows and columns. Since $4 \neq 2$, it is not square.

Answer: 8 entries; not square

L29. Matrix-vector multiplication: two interpretations

Module 2  2026-09-02  ·  10:25  ·  practice PDF

Practice problems (3)
Problem 1. Compute the product of the matrix $A = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \end{bmatrix}$ and the vector $\mathbf{x} = \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix}$.
Reveal solution
  1. Using the row view, the first component is $1(2) + 0(1) + 2(3) = 2 + 0 + 6 = 8$.
  2. The second component is $-1(2) + 3(1) + 1(3) = -2 + 3 + 3 = 4$.
  3. The resulting vector is $\begin{bmatrix} 8 \\ 4 \end{bmatrix}$.

Answer: \begin{bmatrix} 8 \\ 4 \end{bmatrix}

Problem 2. Given the matrix $B = \begin{bmatrix} 2 & 1 \\ 0 & -2 \\ 3 & 4 \end{bmatrix}$ and the vector $\mathbf{v} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$, find $B\mathbf{v}$ using the column view.
Reveal solution
  1. The column view is $1 \begin{bmatrix} 2 \\ 0 \\ 3 \end{bmatrix} + 2 \begin{bmatrix} 1 \\ -2 \\ 4 \end{bmatrix}$.
  2. This equals $\begin{bmatrix} 2 \\ 0 \\ 3 \end{bmatrix} + \begin{bmatrix} 2 \\ -4 \\ 8 \end{bmatrix}$.
  3. Summing the components gives $\begin{bmatrix} 4 \\ -4 \\ 11 \end{bmatrix}$.

Answer: \begin{bmatrix} 4 \\ -4 \\ 11 \end{bmatrix}

Problem 3. If a matrix $C$ has dimensions $4 \times 3$ and a vector $\mathbf{w}$ has dimensions $3 \times 1$, what are the dimensions of the resulting vector $C\mathbf{w}$? If $\mathbf{w}$ had 4 components instead, would the multiplication be possible?
Reveal solution
  1. The product of a $4 \times 3$ matrix and a $3 \times 1$ vector results in a $4 \times 1$ vector.
  2. For multiplication to be possible, the number of columns in the matrix must match the number of components in the vector.
  3. Since the matrix has 3 columns, a vector with 4 components would not match, making the multiplication impossible.

Answer: 4 \times 1; No

L30. Matrix multiplication I — definition and mechanics

Module 2  2026-09-03  ·  11:34  ·  practice PDF

Practice problems (3)
Problem 1. Compute the product $C = AB$ where $A = \begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}$ and $B = \begin{bmatrix} 1 & 4 \\ 2 & 5 \end{bmatrix}$.
Reveal solution
  1. Check dimensions: $(2 \times 2) \times (2 \times 2)$ is defined and results in a $2 \times 2$ matrix.
  2. Compute $c_{11} = (2)(1) + (-1)(2) = 2 - 2 = 0$.
  3. Compute $c_{12} = (2)(4) + (-1)(5) = 8 - 5 = 3$.
  4. Compute $c_{21} = (0)(1) + (3)(2) = 0 + 6 = 6$.
  5. Compute $c_{22} = (0)(4) + (3)(5) = 0 + 15 = 15$.

Answer: \begin{bmatrix} 0 & 3 \\ 6 & 15 \end{bmatrix}

Problem 2. Given $A = \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix}$, compute $AB$ and $BA$ to show they are different.
Reveal solution
  1. Compute $AB$: $c_{11} = 1(1)+2(0)=1$, $c_{12} = 1(1)+2(2)=5$, $c_{21} = 3(1)+0(0)=3$, $c_{22} = 3(1)+0(2)=3$. So $AB = \begin{bmatrix} 1 & 5 \\ 3 & 3 \end{bmatrix}$.
  2. Compute $BA$: $c_{11} = 1(1)+1(3)=4$, $c_{12} = 1(2)+1(0)=2$, $c_{21} = 0(1)+2(3)=6$, $c_{22} = 0(2)+2(0)=0$. So $BA = \begin{bmatrix} 4 & 2 \\ 6 & 0 \end{bmatrix}$.
  3. Compare the results: $\begin{bmatrix} 1 & 5 \\ 3 & 3 \end{bmatrix} \neq \begin{bmatrix} 4 & 2 \\ 6 & 0 \end{bmatrix}$.

Answer: AB = \begin{bmatrix} 1 & 5 \\ 3 & 3 \end{bmatrix}, BA = \begin{bmatrix} 4 & 2 \\ 6 & 0 \end{bmatrix}

Problem 3. Let $A$ be a $3 \times 2$ matrix and $B$ be a $2 \times 4$ matrix. What are the dimensions of the product $C = AB$? Is the product $BA$ defined? Explain.
Reveal solution
  1. For $C = AB$, the dimensions are $(3 \times 2) \times (2 \times 4)$. The inner dimensions match (2), so the product is defined.
  2. The resulting dimensions are the outer dimensions: $3 \times 4$.
  3. For $BA$, the dimensions are $(2 \times 4) \times (3 \times 2)$.
  4. The inner dimensions are 4 and 3. Since $4 \neq 3$, the product $BA$ is undefined.

Answer: C is $3 \times 4$; BA is undefined.

L31. Matrix multiplication II — why it's defined that way

Module 2  2026-09-04  ·  10:13  ·  practice PDF

Practice problems (3)
Problem 1. Let $R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$ be a $90^\circ$ rotation and $S = \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix}$ be a scaling by $3$. Find the matrix $C$ that represents rotating a vector first and then scaling the result.
Reveal solution
  1. The vector is rotated first, so $R$ is the rightmost matrix.
  2. The vector is then scaled, so $S$ is the leftmost matrix.
  3. We compute $C = SR$.
  4. The first row of $S$ dotted with the first column of $R$ is $3(0) + 0(1) = 0$.
  5. The first row of $S$ dotted with the second column of $R$ is $3(-1) + 0(0) = -3$.
  6. The second row of $S$ dotted with the first column of $R$ is $0(0) + 3(1) = 3$.
  7. The second row of $S$ dotted with the second column of $R$ is $0(-1) + 3(0) = 0$.

Answer: \begin{bmatrix} 0 & -3 \\ 3 & 0 \end{bmatrix}

Problem 2. Given $A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}$ and $B = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}$, compute $AB$ and $BA$. Do they commute?
Reveal solution
  1. Compute $AB$: row 1 of $A$ dot col 1 of $B$ is $1(1) + 2(3) = 7$; row 1 of $A$ dot col 2 of $B$ is $1(0) + 2(1) = 2$; row 2 of $A$ dot col 1 of $B$ is $0(1) + 1(3) = 3$; row 2 of $A$ dot col 2 of $B$ is $0(0) + 1(1) = 1$. So $AB = \begin{bmatrix} 7 & 2 \\ 3 & 1 \end{bmatrix}$.
  2. Compute $BA$: row 1 of $B$ dot col 1 of $A$ is $1(1) + 0(0) = 1$; row 1 of $B$ dot col 2 of $A$ is $1(2) + 0(1) = 2$; row 2 of $B$ dot col 1 of $A$ is $3(1) + 1(0) = 3$; row 2 of $B$ dot col 2 of $A$ is $3(2) + 1(1) = 7$. So $BA = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}$.
  3. Since $AB \neq BA$, the matrices do not commute.

Answer: AB = \begin{bmatrix} 7 & 2 \\ 3 & 1 \end{bmatrix}, BA = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}, \text{ No they do not commute.}

Problem 3. A transformation $T_1$ is represented by $M_1 = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}$ and $T_2$ is represented by $M_2 = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$. If we apply $T_1$ then $T_2$, what is the final image of the vector $\mathbf{v} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$? Find the composition matrix first.
Reveal solution
  1. The sequence is $T_1$ then $T_2$, so the composition matrix is $C = M_2 M_1$.
  2. Compute $C = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1(2)+1(0) & 1(0)+1(1) \\ 0(2)+1(0) & 0(0)+1(1) \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}$.
  3. Now apply $C$ to $\mathbf{v}$: $\begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2(1) + 1(1) \\ 0(1) + 1(1) \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}$.

Answer: \begin{bmatrix} 3 \\ 1 \end{bmatrix}

L32. Matrix multiplication properties; why AB is not BA

Module 2  2026-09-05  ·  12:57  ·  practice PDF

Practice problems (3)
Problem 1. Given $A = \begin{pmatrix} 1 & 2 \ 3 & 4 \end{pmatrix}$ and $B = \begin{pmatrix} 0 & 1 \ 1 & 0 \end{pmatrix}$, compute $AB$ and $BA$ to show that $AB \neq BA$.
Reveal solution
  1. Compute $AB$: the first row is $(1\cdot 0 + 2\cdot 1, 1\cdot 1 + 2\cdot 0) = (2, 1)$, the second row is $(3\cdot 0 + 4\cdot 1, 3\cdot 1 + 4\cdot 0) = (4, 3)$. So $AB = \begin{pmatrix} 2 & 1 \ 4 & 3 \end{pmatrix}$.
  2. Compute $BA$: the first row is $(0\cdot 1 + 1\cdot 3, 0\cdot 2 + 1\cdot 4) = (3, 4)$, the second row is $(1\cdot 1 + 0\cdot 3, 1\cdot 2 + 0\cdot 4) = (1, 2)$. So $BA = \begin{pmatrix} 3 & 4 \ 1 & 2 \end{pmatrix}$.
  3. Compare the results: $\begin{pmatrix} 2 & 1 \ 4 & 3 \end{pmatrix} \neq \begin{pmatrix} 3 & 4 \ 1 & 2 \end{pmatrix}$.

Answer: AB = \begin{pmatrix} 2 & 1 \ 4 & 3 \end{pmatrix}, BA = \begin{pmatrix} 3 & 4 \ 1 & 2 \end{pmatrix}

Problem 2. Let $A = \begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$. Compute $AB$ and $BA$. Does $AB = BA$ in this specific case?
Reveal solution
  1. Compute $AB$: the first row is $(1\cdot 5 + 0\cdot 7, 1\cdot 6 + 0\cdot 8) = (5, 6)$, the second row is $(0\cdot 5 + 1\cdot 7, 0\cdot 6 + 1\cdot 8) = (7, 8)$. So $AB = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$.
  2. Compute $BA$: the first row is $(5\cdot 1 + 6\cdot 0, 5\cdot 0 + 6\cdot 1) = (5, 6)$, the second row is $(7\cdot 1 + 8\cdot 0, 7\cdot 0 + 8\cdot 1) = (7, 8)$. So $BA = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}$.
  3. Compare the results: $AB = BA$.

Answer: Yes, AB = BA = \begin{pmatrix} 5 & 6 \ 7 & 8 \end{pmatrix}

Problem 3. Simplify the expression $A(B + C) - AB$, where $A, B, C$ are $2 \times 2$ matrices.
Reveal solution
  1. Apply the distributive law: $A(B + C) = AB + AC$.
  2. Substitute this back into the expression: $(AB + AC) - AB$.
  3. Rearrange the terms: $AB - AB + AC$.
  4. The $AB$ terms cancel out, leaving $AC$.

Answer: AC

L33. The identity matrix and matrix powers

Module 2  2026-09-06  ·  11:57  ·  practice PDF

Practice problems (3)
Problem 1. Compute $A^2$ for the matrix $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$.
Reveal solution
  1. The top left element is the dot product of the first row $(1, 2)$ and first column $(1, 3)$, which is $1(1) + 2(3) = 7$.
  2. The top right element is the dot product of the first row $(1, 2)$ and second column $(2, 4)$, which is $1(2) + 2(4) = 10$.
  3. The bottom left element is the dot product of the second row $(3, 4)$ and first column $(1, 3)$, which is $3(1) + 4(3) = 15$.
  4. The bottom right element is the dot product of the second row $(3, 4)$ and second column $(2, 4)$, which is $3(2) + 4(4) = 22$.

Answer: \begin{pmatrix} 7 & 10 \\ 15 & 22 \end{pmatrix}

Problem 2. Let $A = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$. Compute $A^2$ and $A^4$.
Reveal solution
  1. Compute $A^2$: the top left is $0(0) + (-1)(1) = -1$; top right is $0(-1) + (-1)(0) = 0$; bottom left is $1(0) + 0(1) = 0$; bottom right is $1(-1) + 0(0) = -1$. So $A^2 = -I$.
  2. Compute $A^4$ as $(A^2)^2$. Since $A^2 = -I$, then $A^4 = (-I)(-I)$.
  3. Multiplying $-I$ by $-I$ is the same as $(-1)(-1) I^2$, which is $1 \times I = I$.

Answer: A^2 = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}, A^4 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}

Problem 3. If $A$ is a $3 \times 3$ matrix such that $A^2 = I$, what is the value of $A^3 + 2A^2 + A$ in terms of $A$ and $I$?
Reveal solution
  1. Substitute $A^2 = I$ into the expression: $A^3 + 2A^2 + A = A(A^2) + 2(I) + A$.
  2. Since $A^2 = I$, the first term $A(A^2)$ becomes $A(I) = A$.
  3. The expression is now $A + 2I + A$.
  4. Combine the $A$ terms to get $2A + 2I$.

Answer: 2A + 2I

L34. Transpose and its rules

Module 2  2026-09-07  ·  11:28  ·  practice PDF

Practice problems (3)
Problem 1. Find the transpose of the matrix $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{pmatrix}$.
Reveal solution
  1. The first row $(1, 2)$ becomes the first column.
  2. The second row $(3, 4)$ becomes the second column.
  3. The third row $(5, 6)$ becomes the third column.

Answer: \begin{pmatrix} 1 & 3 & 5 \\ 2 & 4 & 6 \end{pmatrix}

Problem 2. Given $A = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}$ and $B = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$, compute $(A+B)^T$.
Reveal solution
  1. First, find $A+B = \begin{pmatrix} 1+0 & 0+1 \\ 2+1 & 1+0 \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ 3 & 1 \end{pmatrix}$.
  2. Now, transpose the result by swapping rows and columns.

Answer: \begin{pmatrix} 1 & 3 \\ 1 & 1 \end{pmatrix}

Problem 3. If $A$ is a $2 \times 3$ matrix and $B$ is a $3 \times 4$ matrix, what are the dimensions of $(AB)^T$?
Reveal solution
  1. The product $AB$ has dimensions $2 \times 4$.
  2. The transpose of a $2 \times 4$ matrix swaps the number of rows and columns.

Answer: 4 \times 2

L35. Matrix inverse I — concept and 2x2 formula

Module 2  2026-09-08  ·  10:26  ·  practice PDF

Practice problems (3)
Problem 1. Find the inverse of the matrix $A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}$.
Reveal solution
  1. Calculate the determinant: $\text{det}(A) = (3)(2) - (1)(5) = 6 - 5 = 1$.
  2. Swap the main diagonal elements (3 and 2) and negate the off-diagonal elements (1 and 5).
  3. The resulting matrix is $\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}$.
  4. Multiply by $1/\text{det}(A) = 1/1$.

Answer: \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}

Problem 2. Determine if the matrix $B = \begin{pmatrix} 2 & 4 \\ 1 & 2 \end{pmatrix}$ is invertible. If so, find its inverse.
Reveal solution
  1. Calculate the determinant: $\text{det}(B) = (2)(2) - (4)(1) = 4 - 4 = 0$.
  2. Since the determinant is zero, the matrix is singular.

Answer: Not invertible (singular)

Problem 3. Find the inverse of $C = \begin{pmatrix} 4 & 3 \\ 3 & 2 \end{pmatrix}$ and verify it by computing $C C^{-1}$.
Reveal solution
  1. Calculate the determinant: $\text{det}(C) = (4)(2) - (3)(3) = 8 - 9 = -1$.
  2. Apply the formula: $C^{-1} = \frac{1}{-1} \begin{pmatrix} 2 & -3 \\ -3 & 4 \end{pmatrix} = \begin{pmatrix} -2 & 3 \\ 3 & -4 \end{pmatrix}$.
  3. Verify: $\begin{pmatrix} 4 & 3 \\ 3 & 2 \end{pmatrix} \begin{pmatrix} -2 & 3 \\ 3 & -4 \end{pmatrix} = \begin{pmatrix} -8+9 & 12-12 \\ -6+6 & 9-8 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$.

Answer: \begin{pmatrix} -2 & 3 \\ 3 & -4 \end{pmatrix}

L36. Matrix inverse II — Gauss-Jordan computation

Module 2  2026-09-09  ·  10:29  ·  practice PDF

Practice problems (3)
Problem 1. Find the inverse of the matrix $A = \begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 2 & 5 & 2 \end{pmatrix}$ using the Gauss-Jordan method.
Reveal solution
  1. Set up augmented matrix $[A | I]$.
  2. R3 <- R3 - 2*R1 results in $[\begin{smallmatrix} 1 & 2 & 1 & | & 1 & 0 & 0 \\ 0 & 1 & 3 & | & 0 & 1 & 0 \\ 0 & 1 & 0 & | & -2 & 0 & 1 \end{smallmatrix}]$.
  3. R3 <- R3 - R2 results in $[\begin{smallmatrix} 1 & 2 & 1 & | & 1 & 0 & 0 \\ 0 & 1 & 3 & | & 0 & 1 & 0 \\ 0 & 0 & -3 & | & -2 & -1 & 1 \end{smallmatrix}]$.
  4. R3 <- -1/3 * R3 results in $[\begin{smallmatrix} 1 & 2 & 1 & | & 1 & 0 & 0 \\ 0 & 1 & 3 & | & 0 & 1 & 0 \\ 0 & 0 & 1 & | & 2/3 & 1/3 & -1/3 \end{smallmatrix}]$.
  5. R2 <- R2 - 3*R3 and R1 <- R1 - R3 results in $[\begin{smallmatrix} 1 & 2 & 0 & | & 1/3 & -1/3 & 1/3 \\ 0 & 1 & 0 & | & -2 & 0 & 1 \\ 0 & 0 & 1 & | & 2/3 & 1/3 & -1/3 \end{smallmatrix}]$.
  6. R1 <- R1 - 2*R2 results in $[\begin{smallmatrix} 1 & 0 & 0 & | & 13/3 & -1/3 & -5/3 \\ 0 & 1 & 0 & | & -2 & 0 & 1 \\ 0 & 0 & 1 & | & 2/3 & 1/3 & -1/3 \end{smallmatrix}]$.

Answer: \begin{pmatrix} 13/3 & -1/3 & -5/3 \\ -2 & 0 & 1 \\ 2/3 & 1/3 & -1/3 \end{pmatrix}

Problem 2. Determine if the matrix $B = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$ is invertible using the Gauss-Jordan method.
Reveal solution
  1. Set up augmented matrix $[B | I]$.
  2. R2 <- R2 - 4*R1 and R3 <- R3 - 7*R1 results in $[\begin{smallmatrix} 1 & 2 & 3 & | & 1 & 0 & 0 \\ 0 & -3 & -6 & | & -4 & 1 & 0 \\ 0 & -6 & -12 & | & -7 & 0 & 1 \end{smallmatrix}]$.
  3. R3 <- R3 - 2*R2 results in $[\begin{smallmatrix} 1 & 2 & 3 & | & 1 & 0 & 0 \\ 0 & -3 & -6 & | & -4 & 1 & 0 \\ 0 & 0 & 0 & | & 1 & -2 & 1 \end{smallmatrix}]$.
  4. The left side contains a row of zeros, meaning the matrix is singular.

Answer: Not invertible (singular)

Problem 3. Given $C = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}$, find $C^{-1}$ using both the 2x2 formula and the Gauss-Jordan method to verify they match.
Reveal solution
  1. Formula: $\text{det}(C) = (2)(3) - (1)(5) = 1$. $C^{-1} = \frac{1}{1} \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}$.
  2. Gauss-Jordan: $[\begin{smallmatrix} 2 & 1 & | & 1 & 0 \\ 5 & 3 & | & 0 & 1 \end{smallmatrix}]$.
  3. R1 <- 0.5*R1 results in $[\begin{smallmatrix} 1 & 0.5 & | & 0.5 & 0 \\ 5 & 3 & | & 0 & 1 \end{smallmatrix}]$.
  4. R2 <- R2 - 5*R1 results in $[\begin{smallmatrix} 1 & 0.5 & | & 0.5 & 0 \\ 0 & 0.5 & | & -2.5 & 1 \end{smallmatrix}]$.
  5. R2 <- 2*R2 results in $[\begin{smallmatrix} 1 & 0.5 & | & 0.5 & 0 \\ 0 & 1 & | & -5 & 2 \end{smallmatrix}]$.
  6. R1 <- R1 - 0.5*R2 results in $[\begin{smallmatrix} 1 & 0 & | & 3 & -1 \\ 0 & 1 & | & -5 & 2 \end{smallmatrix}]$.

Answer: \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}

L37. When is a matrix invertible? First encounter with singularity

Module 2  2026-09-10  ·  11:04  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the matrix $A = \begin{pmatrix} 3 & 6 \ 2 & 4 \end{pmatrix}$ is singular. Explain your reasoning using the columns.
Reveal solution
  1. Observe the first column $c_1 = \begin{pmatrix} 3 \ 2 \end{pmatrix}$ and the second column $c_2 = \begin{pmatrix} 6 \ 4 \end{pmatrix}$.
  2. Notice that $c_2 = 2 \cdot c_1$.
  3. Since the columns are linearly dependent, the matrix is singular.

Answer: Singular

Problem 2. Find a non-zero vector $x$ such that $Ax = 0$ for the matrix $A = \begin{pmatrix} 1 & 1 \ 2 & 2 \end{pmatrix}$.
Reveal solution
  1. Set up the system $x + y = 0$ and $2x + 2y = 0$.
  2. Both equations simplify to $y = -x$.
  3. Pick $x = 1$, then $y = -1$.
  4. The vector is $\begin{pmatrix} 1 \ -1 \end{pmatrix}$.

Answer: $\begin{pmatrix} 1 \ -1 \end{pmatrix}$

Problem 3. A $3 \times 3$ matrix $M$ has a row echelon form with only two pivots. Is $M$ invertible? Why?
Reveal solution
  1. A $3 \times 3$ matrix is invertible if and only if it has three pivots (one in every row/column).
  2. Since $M$ only has two pivots, the third row of the echelon form must be a row of zeros.
  3. A row of zeros in the echelon form indicates that the matrix is singular.

Answer: No, it is singular.

L38. Elementary matrices: elimination as multiplication

Module 2  2026-09-11  ·  11:17  ·  practice PDF

Practice problems (3)
Problem 1. Find the elementary matrix $E$ that performs the operation $R_2 \leftarrow R_2 - 4 R_1$ on a $2 \times 2$ matrix, and verify it by computing $E A$ for $A = \begin{pmatrix} 1 & 1 \ 4 & 5 \end{pmatrix}$.
Reveal solution
  1. Apply $R_2 \leftarrow R_2 - 4 R_1$ to $I = \begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix}$.
  2. The first row remains $\begin{pmatrix} 1 & 0 \end{pmatrix}$. The second row becomes $\begin{pmatrix} 0 - 4(1) & 1 - 4(0) \end{pmatrix} = \begin{pmatrix} -4 & 1 \end{pmatrix}$.
  3. So $E = \begin{pmatrix} 1 & 0 \ -4 & 1 \end{pmatrix}$.
  4. Compute $E A = \begin{pmatrix} 1 & 0 \ -4 & 1 \end{pmatrix} \begin{pmatrix} 1 & 1 \ 4 & 5 \end{pmatrix} = \begin{pmatrix} 1(1)+0(4) & 1(1)+0(5) \\ -4(1)+1(4) & -4(1)+1(5) \end{pmatrix} = \begin{pmatrix} 1 & 1 \ 0 & 1 \end{pmatrix}$.

Answer: E = \begin{pmatrix} 1 & 0 \ -4 & 1 \end{pmatrix}, E A = \begin{pmatrix} 1 & 1 \ 0 & 1 \end{pmatrix}

Problem 2. Given the elementary matrix $E = \begin{pmatrix} 0 & 1 \ 1 & 0 \end{pmatrix}$, what row operation does it perform, and what is its inverse $E^{-1}$?
Reveal solution
  1. Compare $E$ to the identity matrix $I = \begin{pmatrix} 1 & 0 \ 0 & 1 \end{pmatrix}$.
  2. The rows of $I$ have been swapped. Thus, $E$ performs the operation $R_1 \leftrightarrow R_2$.
  3. To undo a swap, you swap the rows back. The operation $R_1 \leftrightarrow R_2$ is its own inverse.
  4. Therefore, $E^{-1} = E = \begin{pmatrix} 0 & 1 \ 1 & 0 \end{pmatrix}$.

Answer: Operation: R_1 \leftrightarrow R_2, E^{-1} = \begin{pmatrix} 0 & 1 \ 1 & 0 \end{pmatrix}

Problem 3. A $2 \times 2$ matrix $A$ is transformed into $R$ by first multiplying the first row by $2$, then adding $3$ times the first row to the second row. Write the product of elementary matrices $E_2 E_1$ that represents this sequence.
Reveal solution
  1. Step 1: $R_1 \leftarrow 2 R_1$. The elementary matrix is $E_1 = \begin{pmatrix} 2 & 0 \ 0 & 1 \end{pmatrix}$.
  2. Step 2: $R_2 \leftarrow R_2 + 3 R_1$. The elementary matrix is $E_2 = \begin{pmatrix} 1 & 0 \ 3 & 1 \end{pmatrix}$.
  3. The total transformation is $R = E_2 (E_1 A) = (E_2 E_1) A$.
  4. Compute $E_2 E_1 = \begin{pmatrix} 1 & 0 \ 3 & 1 \end{pmatrix} \begin{pmatrix} 2 & 0 \ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1(2)+0(0) & 1(0)+0(1) \\ 3(2)+1(0) & 3(0)+1(1) \end{pmatrix} = \begin{pmatrix} 2 & 0 \ 6 & 1 \end{pmatrix}$.

Answer: E_2 E_1 = \begin{pmatrix} 2 & 0 \ 6 & 1 \end{pmatrix}

L39. LU decomposition I — the idea

Module 2  2026-09-12  ·  11:58  ·  practice PDF

Practice problems (3)
Problem 1. Find the LU decomposition of the matrix $A = \begin{pmatrix} 2 & 1 \\ 8 & 7 \end{pmatrix}$.
Reveal solution
  1. Perform elimination on A to find U. Subtract 4 times row 1 from row 2: $8 - 4(2) = 0$ and $7 - 4(1) = 3$.
  2. The resulting upper triangular matrix is $U = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}$.
  3. The multiplier used was 4. Place this in the second row, first column of L.
  4. The lower triangular matrix is $L = \begin{pmatrix} 1 & 0 \\ 4 & 1 \end{pmatrix}$.

Answer: L = \begin{pmatrix} 1 & 0 \\ 4 & 1 \end{pmatrix}, U = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}

Problem 2. Given $L = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix}$ and $U = \begin{pmatrix} 3 & 5 \\ 0 & 4 \end{pmatrix}$, find the original matrix $A$.
Reveal solution
  1. Compute the product $L U$.
  2. First row: $1(3) + 0(0) = 3$ and $1(5) + 0(4) = 5$.
  3. Second row: $2(3) + 1(0) = 6$ and $2(5) + 1(4) = 14$.

Answer: A = \begin{pmatrix} 3 & 5 \\ 6 & 14 \end{pmatrix}

Problem 3. Find the LU decomposition of $A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 5 & 3 \\ 1 & 0 & 1 \end{pmatrix}$.
Reveal solution
  1. Step 1: Eliminate column 1. $R_2 \leftarrow R_2 - 2R_1$ and $R_3 \leftarrow R_3 - 1R_1$. Multipliers are $L_{21}=2, L_{31}=1$.
  2. Matrix becomes $\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & -2 & 0 \end{pmatrix}$.
  3. Step 2: Eliminate column 2. $R_3 \leftarrow R_3 - (-2)R_2$, which is $R_3 + 2R_2$. Multiplier is $L_{32}=-2$.
  4. Matrix becomes $U = \begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 2 \end{pmatrix}$.
  5. Step 3: Construct $L$ using multipliers: $L = \begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 1 & -2 & 1 \end{pmatrix}$.

Answer: L = \begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 1 & -2 & 1 \end{pmatrix}, U = \begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 2 \end{pmatrix}

L40. LU decomposition II — solving systems efficiently

Module 2  2026-09-13  ·  10:18  ·  practice PDF

Practice problems (3)
Problem 1. Using the matrices $L = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 3 & 4 & 1 \end{bmatrix}$ and $U = \begin{bmatrix} 2 & 1 & 1 \\ 0 & 3 & 2 \\ 0 & 0 & 1 \end{bmatrix}$, solve the system $A x = b$ for $b = \begin{bmatrix} 5 \\ 10 \\ 23 \end{bmatrix}$.
Reveal solution
  1. Step 1: Solve $L y = b$. $y_1 = 5$. $2(5) + y_2 = 10 \implies y_2 = 0$. $3(5) + 4(0) + y_3 = 23 \implies y_3 = 8$. So $y = [5, 0, 8]^T$.
  2. Step 2: Solve $U x = y$. $1 x_3 = 8 \implies x_3 = 8$. $3 x_2 + 2(8) = 0 \implies 3 x_2 = -16 \implies x_2 = -16/3$. $2 x_1 + (-16/3) + 8 = 5 \implies 2 x_1 = 5 - 8 + 16/3 = -3 + 16/3 = 7/3 \implies x_1 = 7/6$.

Answer: x = [7/6, -16/3, 8]^T

Problem 2. Given $L = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}$ and $U = \begin{bmatrix} 2 & 5 \\ 0 & 4 \end{bmatrix}$, find the determinant of $A = LU$.
Reveal solution
  1. The determinant of $A$ is the product of the diagonal elements of $U$.
  2. $\text{det}(A) = 2 \times 4 = 8$.

Answer: 8

Problem 3. If a $3 \times 3$ matrix $A$ has an LU decomposition where $U$ has diagonal elements $2, 0, 5$, what can you conclude about the system $A x = b$?
Reveal solution
  1. The determinant of $A$ is the product of the diagonal elements of $U$.
  2. $\text{det}(A) = 2 \times 0 \times 5 = 0$.
  3. Since the determinant is zero, the matrix $A$ is singular.

Answer: The matrix A is singular, meaning the system may have no solution or infinitely many solutions.

L41. Symmetric, diagonal, triangular, and permutation matrices — a bestiary

Module 2  2026-09-14  ·  11:32  ·  practice PDF

Practice problems (3)
Problem 1. Determine which of the following categories the matrix $A = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 5 & 0 \\ 2 & 0 & 3 \end{bmatrix}$ belongs to: diagonal, triangular, or symmetric.
Reveal solution
  1. Check if it is diagonal: The entry $a_{13} = 2$ is not on the main diagonal, so it is not diagonal.
  2. Check if it is triangular: There are non-zero entries both above ($a_{13}=2$) and below ($a_{31}=2$) the diagonal, so it is neither upper nor lower triangular.
  3. Check if it is symmetric: The transpose $A^T$ has $a_{13}$ becoming $a_{31}$ and vice versa. Since $a_{13} = 2$ and $a_{31} = 2$, and all other off-diagonal pairs match, $A = A^T$.

Answer: Symmetric

Problem 2. Given the permutation matrix $P = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}$ and vector $v = \begin{bmatrix} 10 \\ 20 \\ 30 \end{bmatrix}$, compute $Pv$.
Reveal solution
  1. The first row of $P$ is $[0, 0, 1]$, so the first entry of $Pv$ is $0(10) + 0(20) + 1(30) = 30$.
  2. The second row of $P$ is $[1, 0, 0]$, so the second entry of $Pv$ is $1(10) + 0(20) + 0(30) = 10$.
  3. The third row of $P$ is $[0, 1, 0]$, so the third entry of $Pv$ is $0(10) + 1(20) + 0(30) = 20$.

Answer: \begin{bmatrix} 30 \\ 10 \\ 20 \end{bmatrix}

Problem 3. If $D_1 = \begin{bmatrix} 2 & 0 \\ 0 & -3 \end{bmatrix}$ and $D_2 = \begin{bmatrix} 4 & 0 \\ 0 & 5 \end{bmatrix}$, find the matrix $M = D_1 D_2 + D_1$.
Reveal solution
  1. Compute $D_1 D_2$ by multiplying diagonal entries: $\begin{bmatrix} 2 \cdot 4 & 0 \\ 0 & -3 \cdot 5 \end{bmatrix} = \begin{bmatrix} 8 & 0 \\ 0 & -15 \end{bmatrix}$.
  2. Add $D_1$ to the result: $\begin{bmatrix} 8 & 0 \\ 0 & -15 \end{bmatrix} + \begin{bmatrix} 2 & 0 \\ 0 & -3 \end{bmatrix}$.
  3. Sum the corresponding entries: $\begin{bmatrix} 8+2 & 0 \\ 0 & -15-3 \end{bmatrix} = \begin{bmatrix} 10 & 0 \\ 0 & -18 \end{bmatrix}$.

Answer: \begin{bmatrix} 10 & 0 \\ 0 & -18 \end{bmatrix}

L42. Block matrices and partitioned multiplication

Module 2  2026-09-15  ·  11:12  ·  practice PDF

Practice problems (3)
Problem 1. Given $A = \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}$, partition both into $2 \times 2$ blocks and compute the top-left block $C_{11}$ of the product $C = AB$.
Reveal solution
  1. Identify $A_{11} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, $A_{12} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, $B_{11} = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$, and $B_{21} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$.
  2. Apply the block formula: $C_{11} = A_{11}B_{11} + A_{12}B_{21}$.
  3. Compute $A_{11}B_{11} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$.
  4. Compute $A_{12}B_{21} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$.
  5. Sum the results: $C_{11} = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$.

Answer: \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}

Problem 2. If $A$ and $B$ are both $4 \times 4$ block diagonal matrices with $2 \times 2$ blocks $A_{11}, A_{22}$ and $B_{11}, B_{22}$, what is the resulting matrix $C = AB$ in terms of these blocks?
Reveal solution
  1. A block diagonal matrix has the form $\begin{bmatrix} A_{11} & 0 \\ 0 & A_{22} \end{bmatrix}$.
  2. The product of two such matrices is $\begin{bmatrix} A_{11} & 0 \\ 0 & A_{22} \end{bmatrix} \begin{bmatrix} B_{11} & 0 \\ 0 & B_{22} \end{bmatrix}$.
  3. Using block multiplication: $C_{11} = A_{11}B_{11} + 0 \cdot 0 = A_{11}B_{11}$.
  4. Similarly, $C_{12} = A_{11} \cdot 0 + 0 \cdot B_{22} = 0$.
  5. And $C_{21} = 0 \cdot B_{11} + A_{22} \cdot 0 = 0$.
  6. Finally, $C_{22} = 0 \cdot 0 + A_{22}B_{22} = A_{22}B_{22}$.

Answer: \begin{bmatrix} A_{11}B_{11} & 0 \\ 0 & A_{22}B_{22} \end{bmatrix}

Problem 3. Let $A$ be a $2 \times 4$ matrix partitioned as $[A_{11} \ A_{12}]$ and $B$ be a $4 \times 2$ matrix partitioned as $\begin{bmatrix} B_{11} \\ B_{21} \end{bmatrix}$, where all blocks are $2 \times 2$. If $A_{11} = I$, $A_{12} = I$, $B_{11} = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$, and $B_{21} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$, compute the resulting $2 \times 2$ matrix $C$.
Reveal solution
  1. The formula for this product is $C = A_{11}B_{11} + A_{12}B_{21}$.
  2. Substitute the given blocks: $C = I \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + I \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.
  3. Since $I$ is the identity, $I M = M$ for any matrix $M$.
  4. So, $C = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} + \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.
  5. Perform the addition: $C = \begin{bmatrix} 1+0 & 2+1 \\ 3+1 & 4+0 \end{bmatrix} = \begin{bmatrix} 1 & 3 \\ 4 & 4 \end{bmatrix}$.

Answer: \begin{bmatrix} 1 & 3 \\ 4 & 4 \end{bmatrix}

L43. Module 2 review + self-test

Module 2  2026-09-16  ·  10:15  ·  practice PDF

Practice problems (3)
Problem 1. Find the inverse of $A = \begin{bmatrix} 4 & 3 \\ 3 & 2 \end{bmatrix}$ and use it to solve $Ax = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$.
Reveal solution
  1. Compute the determinant: $\text{det}(A) = (4)(2) - (3)(3) = 8 - 9 = -1$.
  2. Find the inverse: $A^{-1} = \frac{1}{-1} \begin{bmatrix} 2 & -3 \\ -3 & 4 \end{bmatrix} = \begin{bmatrix} -2 & 3 \\ 3 & -4 \end{bmatrix}$.
  3. Solve for $x$: $x = A^{-1}b = \begin{bmatrix} -2 & 3 \\ 3 & -4 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} -2 \\ 3 \end{bmatrix}$.

Answer: x = \begin{bmatrix} -2 \\ 3 \end{bmatrix}

Problem 2. Given block matrices $M = \begin{bmatrix} A & 0 \\ 0 & B \end{bmatrix}$ and $N = \begin{bmatrix} C & 0 \\ 0 & D \end{bmatrix}$ where $A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, $B = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$, $C = \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix}$, and $D = \begin{bmatrix} 4 & 0 \\ 0 & 4 \end{bmatrix}$, compute $MN$.
Reveal solution
  1. Use block multiplication: $MN = \begin{bmatrix} AC & 0 \\ 0 & BD \end{bmatrix}$.
  2. Compute $AC = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix}$.
  3. Compute $BD = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} 4 & 0 \\ 0 & 4 \end{bmatrix} = \begin{bmatrix} 8 & 0 \\ 0 & 8 \end{bmatrix}$.
  4. Assemble the result: $MN = \begin{bmatrix} 3 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 \\ 0 & 0 & 8 & 0 \\ 0 & 0 & 0 & 8 \end{bmatrix}$.

Answer: \begin{bmatrix} 3 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 \\ 0 & 0 & 8 & 0 \\ 0 & 0 & 0 & 8 \end{bmatrix}

Problem 3. Perform an LU decomposition on $A = \begin{bmatrix} 2 & 1 \\ 8 & 7 \end{bmatrix}$ and verify that $L U = A$.
Reveal solution
  1. Eliminate the 8 in the second row: $R_2 \leftarrow R_2 - 4 R_1$.
  2. The resulting upper triangular matrix is $U = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}$.
  3. The multiplier was 4, so the lower triangular matrix is $L = \begin{bmatrix} 1 & 0 \\ 4 & 1 \end{bmatrix}$.
  4. Verify: $LU = \begin{bmatrix} 1 & 0 \\ 4 & 1 \end{bmatrix} \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} = \begin{bmatrix} (1)(2)+(0)(0) & (1)(1)+(0)(3) \\ (4)(2)+(1)(0) & (4)(1)+(1)(3) \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 8 & 7 \end{bmatrix}$.

Answer: L = \begin{bmatrix} 1 & 0 \\ 4 & 1 \end{bmatrix}, U = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}

Module 3 — Determinants (10/10)

L44. The determinant as area/volume scaling factor

Module 3  2026-09-17  ·  10:55  ·  practice PDF

Practice problems (3)
Problem 1. A region in the plane has an area of $7$. It is transformed by the matrix $A = \begin{bmatrix} 4 & 1 \\ 2 & 1 \end{bmatrix}$. What is the area of the transformed region?
Reveal solution
  1. First, compute the determinant of $A$: $\det(A) = (4 \times 1) - (1 \times 2) = 4 - 2 = 2$.
  2. The area scaling factor is the absolute value of the determinant, which is $|2| = 2$.
  3. Multiply the original area by the scaling factor: $7 \times 2 = 14$.

Answer: 14

Problem 2. Does the transformation represented by $M = \begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}$ preserve the orientation of the plane? Does it preserve area?
Reveal solution
  1. Compute the determinant: $\det(M) = (2 \times 3) - (5 \times 1) = 6 - 5 = 1$.
  2. Since the determinant is positive, the orientation is preserved.
  3. Since the absolute value of the determinant is $1$, the area is preserved.

Answer: Yes to both

Problem 3. A transformation $T$ scales all areas by a factor of $4$ and reverses the orientation of the plane. If the matrix is $A = \begin{bmatrix} a & 1 \\ 2 & 1 \end{bmatrix}$, find the value of $a$.
Reveal solution
  1. The area scaling factor is $|\det(A)| = 4$.
  2. Since the orientation is reversed, $\det(A)$ must be $-4$.
  3. Set up the equation: $(a \times 1) - (1 \times 2) = -4$.
  4. Solve for $a$: $a - 2 = -4$, so $a = -2$.

Answer: -2

L45. 2x2 and 3x3 determinants; orientation and sign

Module 3  2026-09-18  ·  10:20  ·  practice PDF

Practice problems (3)
Problem 1. Compute the determinant of the matrix $A = \begin{bmatrix} 5 & 2 \\ 3 & 4 \end{bmatrix}$.
Reveal solution
  1. Identify the entries: $a=5, b=2, c=3, d=4$.
  2. Apply the 2x2 formula: $\det(A) = ad - bc$.
  3. Calculate the products: $5 \times 4 = 20$ and $2 \times 3 = 6$.
  4. Subtract the results: $20 - 6 = 14$.

Answer: 14

Problem 2. Compute the determinant of the matrix $B = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 3 \\ 2 & 0 & 1 \end{bmatrix}$ using the rule of Sarrus.
Reveal solution
  1. Calculate downward diagonals: $(1 \times 1 \times 1) + (2 \times 3 \times 2) + (1 \times 0 \times 0) = 1 + 12 + 0 = 13$.
  2. Calculate upward diagonals: $(2 \times 1 \times 1) + (0 \times 3 \times 1) + (1 \times 0 \times 2) = 2 + 0 + 0 = 2$.
  3. Subtract the upward sum from the downward sum: $13 - 2 = 11$.

Answer: 11

Problem 3. Does the transformation represented by $C = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$ preserve or reverse orientation? Explain using the determinant.
Reveal solution
  1. Compute the determinant: $\det(C) = (0 \times 0) - (1 \times 1)$.
  2. The result is $0 - 1 = -1$.
  3. Since the determinant is negative, the transformation reverses the orientation of the plane.

Answer: Reverses orientation because $\det(C) = -1$.

L46. Properties of determinants (from the geometric view)

Module 3  2026-09-19  ·  10:25  ·  practice PDF

Practice problems (3)
Problem 1. Find the determinant of the matrix $A = \begin{bmatrix} 2 & 4 \\ 5 & 10 \end{bmatrix}$ using the properties learned today.
Reveal solution
  1. Observe that the second row $[5, 10]$ is $2.5$ times the first row $[2, 4]$.
  2. Since the rows are linearly dependent, the vectors are collinear.
  3. The area of the resulting parallelogram is zero.

Answer: 0

Problem 2. If $\det(A) = 5$, what is the determinant of the matrix $B$ obtained by swapping two rows of $A$ and then multiplying the first row by $3$?
Reveal solution
  1. Starting determinant is $5$.
  2. Swapping two rows multiplies the determinant by $-1$, giving $-5$.
  3. Multiplying one row by $3$ multiplies the determinant by $3$, giving $-5 \times 3 = -15$.

Answer: -15

Problem 3. Calculate the determinant of $M = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}$ by using the row operation $R_2 \to R_2 - 3R_1$.
Reveal solution
  1. Perform the operation: $R_2$ becomes $[3 - 3(1), 7 - 3(2)] = [0, 1]$.
  2. The new matrix is $\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}$.
  3. The row addition property states the determinant remains unchanged.
  4. The determinant of the resulting matrix is $1 \times 1 - 2 \times 0 = 1$.

Answer: 1

L47. Cofactor expansion

Module 3  2026-09-20  ·  10:58  ·  practice PDF

Practice problems (3)
Problem 1. Compute the determinant of the matrix $A = \begin{bmatrix} 2 & 0 & 1 \\ 3 & 0 & 4 \\ 1 & 5 & 2 \end{bmatrix}$ using cofactor expansion.
Reveal solution
  1. Choose the second column for expansion because it has two zeros.
  2. The only non-zero element is $a_{32} = 5$.
  3. The cofactor sign for row 3, column 2 is $(-1)^{3+2} = -1$.
  4. The minor $M_{32}$ is the determinant of $\begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix}$, which is $(2 \cdot 4) - (1 \cdot 3) = 8 - 3 = 5$.
  5. The determinant is $a_{32} \cdot C_{32} = 5 \cdot (-1 \cdot 5) = -25$.

Answer: -25

Problem 2. Find the determinant of $B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$ using cofactor expansion along the first row to verify it matches the 2x2 formula.
Reveal solution
  1. Expand along row 1: elements are 1 and 2.
  2. First term: $1 \cdot C_{11} = 1 \cdot (-1)^{1+1} \cdot \det[4] = 1 \cdot 1 \cdot 4 = 4$.
  3. Second term: $2 \cdot C_{12} = 2 \cdot (-1)^{1+2} \cdot \det[3] = 2 \cdot (-1) \cdot 3 = -6$.
  4. Sum: $4 - 6 = -2$.

Answer: -2

Problem 3. Calculate the determinant of $C = \begin{bmatrix} 1 & 0 & 3 \\ 2 & 1 & 0 \\ 0 & 4 & 5 \end{bmatrix}$ by expanding along the first column.
Reveal solution
  1. Expand along column 1: elements are 1, 2, 0.
  2. Term 1: $1 \cdot C_{11} = 1 \cdot (-1)^{1+1} \cdot \det \begin{bmatrix} 1 & 0 \\ 4 & 5 \end{bmatrix} = 1 \cdot 1 \cdot (5 - 0) = 5$.
  3. Term 2: $2 \cdot C_{21} = 2 \cdot (-1)^{2+1} \cdot \det \begin{bmatrix} 0 & 3 \\ 4 & 5 \end{bmatrix} = 2 \cdot (-1) \cdot (0 - 12) = -2 \cdot (-12) = 24$.
  4. Term 3: $0 \cdot C_{31} = 0$.
  5. Sum: $5 + 24 + 0 = 29$.

Answer: 29

L48. Determinants via row reduction — the practical method

Module 3  2026-09-21  ·  11:24  ·  practice PDF

Practice problems (3)
Problem 1. Compute the determinant of the matrix $A = \begin{bmatrix} 2 & 1 & 0 \\ 1 & 2 & 1 \\ 0 & 1 & 2 \end{bmatrix}$ using row reduction.
Reveal solution
  1. Step 1: Replace $R_2$ with $R_2 - 0.5 R_1$. The matrix becomes $\begin{bmatrix} 2 & 1 & 0 \\ 0 & 1.5 & 1 \\ 0 & 1 & 2 \end{bmatrix}$. Determinant is unchanged.
  2. Step 2: Replace $R_3$ with $R_3 - (1/1.5) R_2$, which is $R_3 - (2/3) R_2$. The matrix becomes $\begin{bmatrix} 2 & 1 & 0 \\ 0 & 1.5 & 1 \\ 0 & 0 & 2 - 2/3 \end{bmatrix} = \begin{bmatrix} 2 & 1 & 0 \\ 0 & 1.5 & 1 \\ 0 & 0 & 4/3 \end{bmatrix}$. Determinant is unchanged.
  3. Step 3: Multiply the diagonal elements: $2 \cdot 1.5 \cdot (4/3) = 2 \cdot (3/2) \cdot (4/3) = 4$.

Answer: 4

Problem 2. Find the determinant of $B = \begin{bmatrix} 0 & 2 \\ 3 & 4 \end{bmatrix}$ using the row reduction method.
Reveal solution
  1. Step 1: Swap $R_1$ and $R_2$ to get a non-zero pivot. The matrix becomes $\begin{bmatrix} 3 & 4 \\ 0 & 2 \end{bmatrix}$. This introduces a factor of $-1$.
  2. Step 2: The matrix is now upper triangular. The product of the pivots is $3 \cdot 2 = 6$.
  3. Step 3: Apply the swap factor: $(-1) \cdot 6 = -6$.

Answer: -6

Problem 3. Determine if the matrix $C = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 0 & 1 \end{bmatrix}$ is singular by attempting to find its determinant via row reduction.
Reveal solution
  1. Step 1: Replace $R_2$ with $R_2 - 2 R_1$. The matrix becomes $\begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 1 & 0 & 1 \end{bmatrix}$.
  2. Step 2: We observe that the second row has become all zeros.
  3. Step 3: Any triangular matrix with a zero on the diagonal has a determinant of $0$. Therefore, $\det(C) = 0$ and the matrix is singular.

Answer: 0 (Singular)

L49. det(AB) = det(A)det(B) and consequences

Module 3  2026-09-22  ·  10:51  ·  practice PDF

Practice problems (3)
Problem 1. Given $A = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 0 \\ 4 & 2 \end{pmatrix}$, compute $\det(AB)$ using the multiplicativity property.
Reveal solution
  1. Compute $\det(A) = (2)(3) - (1)(0) = 6$.
  2. Compute $\det(B) = (1)(2) - (0)(4) = 2$.
  3. Apply the property $\det(AB) = \det(A)\det(B) = 6 \times 2 = 12$.

Answer: 12

Problem 2. A $3 \times 3$ matrix $M$ has $\det(M) = -5$. What is the determinant of $M^3$?
Reveal solution
  1. Use the power property $\det(M^k) = (\det(M))^k$.
  2. Substitute $k = 3$ and $\det(M) = -5$.
  3. Calculate $(-5)^3 = (-5) \times (-5) \times (-5) = -125$.

Answer: -125

Problem 3. If $\det(A) = 2$ and $\det(B) = 0.5$, find $\det(A^2 B^{-1})$.
Reveal solution
  1. Use the property $\det(A^2 B^{-1}) = \det(A)^2 \times \det(B^{-1})$.
  2. Calculate $\det(A)^2 = 2^2 = 4$.
  3. Calculate $\det(B^{-1}) = 1/\det(B) = 1/0.5 = 2$.
  4. Multiply the results: $4 \times 2 = 8$.

Answer: 8

L50. Cramer's rule (and why you rarely use it)

Module 3  2026-09-23  ·  10:10  ·  practice PDF

Practice problems (3)
Problem 1. Use Cramer's rule to find the value of $x$ for the system: $3x + 2y = 7$ and $4x - y = 2$.
Reveal solution
  1. Identify $A = \begin{bmatrix} 3 & 2 \\ 4 & -1 \end{bmatrix}$ and $b = \begin{bmatrix} 7 \\ 2 \end{bmatrix}$.
  2. Compute $\det(A) = (3)(-1) - (2)(4) = -3 - 8 = -11$.
  3. Construct $A_1 = \begin{bmatrix} 7 & 2 \\ 2 & -1 \end{bmatrix}$.
  4. Compute $\det(A_1) = (7)(-1) - (2)(2) = -7 - 4 = -11$.
  5. Calculate $x = \frac{-11}{-11} = 1$.

Answer: x = 1

Problem 2. Solve the system $x + y = 5$ and $2x + 3y = 13$ completely using Cramer's rule.
Reveal solution
  1. $\det(A) = (1)(3) - (1)(2) = 1$.
  2. $\det(A_1) = (5)(3) - (1)(13) = 15 - 13 = 2$.
  3. $\det(A_2) = (1)(13) - (5)(2) = 13 - 10 = 3$.
  4. Calculate $x = 2/1 = 2$ and $y = 3/1 = 3$.

Answer: x = 2, y = 3

Problem 3. Consider the system $ax + by = e$ and $cx + dy = f$. Use Cramer's rule to write the general formula for $x$ in terms of the coefficients.
Reveal solution
  1. The coefficient matrix is $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$.
  2. The determinant is $\det(A) = ad - bc$.
  3. The modified matrix for $x$ is $A_1 = \begin{bmatrix} e & b \\ f & d \end{bmatrix}$.
  4. The determinant is $\det(A_1) = ed - bf$.
  5. The formula is $x = \frac{ed - bf}{ad - bc}$.

Answer: x = \frac{ed - bf}{ad - bc}

L51. The determinant test for invertibility — tying it together

Module 3  2026-09-24  ·  11:54  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the matrix $A = \begin{pmatrix} 4 & 6 \\ 2 & 3 \end{pmatrix}$ is invertible. Explain your reasoning using the determinant.
Reveal solution
  1. Compute the determinant: $\det(A) = (4)(3) - (6)(2)$
  2. Calculate the values: $12 - 12 = 0$
  3. Since the determinant is zero, the matrix is singular.

Answer: Not invertible (singular) because $\det(A) = 0$.

Problem 2. Given a $3 \times 3$ matrix $B$ where $\det(B) = -5$, is the system $Bx = 0$ guaranteed to have only the trivial solution $x = 0$? Why?
Reveal solution
  1. The determinant $\det(B) = -5$ is non zero.
  2. A non zero determinant implies the matrix $B$ is invertible.
  3. If $B$ is invertible, we can multiply $Bx = 0$ by $B^{-1}$ on the left.
  4. This gives $x = B^{-1} 0$, which simplifies to $x = 0$.

Answer: Yes, because $\det(B) \neq 0$ implies $B$ is invertible, ensuring a unique solution.

Problem 3. Consider the matrix $C = \begin{pmatrix} k & 2 \\ 3 & 6 \end{pmatrix}$. For what value of $k$ is this matrix singular?
Reveal solution
  1. A matrix is singular if its determinant is zero.
  2. Set up the determinant equation: $(k)(6) - (2)(3) = 0$
  3. Simplify the equation: $6k - 6 = 0$
  4. Solve for $k$: $6k = 6$, so $k = 1$.

Answer: $k = 1$

L52. Determinant clinic — mixed practice

Module 3  2026-09-25  ·  11:05  ·  practice PDF

Practice problems (3)
Problem 1. Compute the determinant of $A = \begin{pmatrix} 2 & 0 & 1 \\ 5 & 0 & 3 \\ 1 & 4 & 2 \end{pmatrix}$ using the most efficient method.
Reveal solution
  1. Notice that the second column has two zeros.
  2. Expand along the second column. The only non-zero entry is $4$ at position $(3,2)$.
  3. The sign for position $(3,2)$ is negative.
  4. The determinant is $-4 \times \det \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}$.
  5. Calculate the $2 \times 2$ determinant: $(2 \times 3) - (1 \times 5) = 6 - 5 = 1$.
  6. The final result is $-4 \times 1 = -4$.

Answer: -4

Problem 2. Find the determinant of $B = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}^3$.
Reveal solution
  1. First, find the determinant of the base matrix $B$.
  2. $\det(B) = (1 \times 4) - (2 \times 3) = 4 - 6 = -2$.
  3. Use the property $\det(B^k) = (\det(B))^k$.
  4. The determinant is $(-2)^3$.
  5. Calculate $(-2) \times (-2) \times (-2) = -8$.

Answer: -8

Problem 3. Determine if the matrix $C = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 2 & 2 \\ 0 & 1 & 3 \end{pmatrix}$ is invertible by calculating its determinant.
Reveal solution
  1. Observe the rows of the matrix.
  2. Row 2 is exactly $2$ times Row 1.
  3. Since the rows are linearly dependent, the determinant must be $0$.
  4. Because $\det(C) = 0$, the matrix is singular.
  5. Therefore, the matrix is not invertible.

Answer: Not invertible (\det(C) = 0)

L53. Module 3 review + self-test

Module 3  2026-09-26  ·  11:04  ·  practice PDF

Practice problems (3)
Problem 1. Compute the determinant of the matrix $A = \begin{pmatrix} 2 & 0 & 0 \\ 1 & 3 & 0 \\ 4 & -1 & 2 \end{pmatrix}$.
Reveal solution
  1. Notice that the matrix is lower triangular.
  2. The determinant of a triangular matrix is the product of its diagonal entries.
  3. Calculate $2 \times 3 \times 2 = 12$.

Answer: 12

Problem 2. If $A$ is a $3 \times 3$ matrix with $\det(A) = -2$, find $\det(5A^T)$.
Reveal solution
  1. The transpose does not change the determinant: $\det(A^T) = \det(A) = -2$.
  2. For a $3 \times 3$ matrix, $\det(kA) = k^3 \det(A)$.
  3. Substitute $k=5$ and $\det(A^T)=-2$: $5^3 \times (-2) = 125 \times (-2) = -250$.

Answer: -250

Problem 3. Determine if the matrix $M = \begin{pmatrix} 1 & 2 \\ 3 & 6 \end{pmatrix}$ is invertible and explain why using the determinant.
Reveal solution
  1. Compute the determinant: $\det(M) = (1 \times 6) - (2 \times 3)$.
  2. Calculate $6 - 6 = 0$.
  3. Since the determinant is zero, the matrix is singular and therefore not invertible.

Answer: Not invertible because $\det(M) = 0$

Module 4 — Vector Spaces (17/17)

L54. What is a vector space? Abstracting the rules

Module 4  2026-09-27  ·  11:08  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the set $V = \{ [x, y, z] \mid x + y + z = 0 \}$ is a vector space.
Reveal solution
  1. Check closure under addition: if $u = [x_1, y_1, z_1]$ and $v = [x_2, y_2, z_2]$ are in $V$, then $x_1+y_1+z_1=0$ and $x_2+y_2+z_2=0$. Their sum is $[x_1+x_2, y_1+y_2, z_1+z_2]$. The sum of these components is $(x_1+y_1+z_1) + (x_2+y_2+z_2) = 0 + 0 = 0$. So it is closed under addition.
  2. Check closure under scalar multiplication: $c u = [cx_1, cy_1, cz_1]$. The sum of components is $c(x_1+y_1+z_1) = c(0) = 0$. So it is closed under scalar multiplication.
  3. Check for zero vector: $[0, 0, 0]$ satisfies $0+0+0=0$, so it is in $V$.
  4. Since it is a subset of $\mathbb{R}^3$ and satisfies these properties, it is a vector space.

Answer: Yes, it is a vector space.

Problem 2. Is the set of all $2 \times 2$ matrices with a determinant of $0$ a vector space?
Reveal solution
  1. Check closure under addition. Let $A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$.
  2. Both have $\det(A)=0$ and $\det(B)=0$, so they are in the set.
  3. The sum is $A+B = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$.
  4. The determinant of the sum is $\det(A+B) = 1 \cdot 1 - 0 \cdot 0 = 1$.
  5. Since the sum is not in the set, it is not closed under addition.

Answer: No, it is not a vector space.

Problem 3. Consider the set of all functions $f(x)$ such that $f(0) = 1$. Is this a vector space?
Reveal solution
  1. Check for the zero vector. The zero vector in the space of functions is the function $z(x) = 0$ for all $x$.
  2. For this function, $z(0) = 0$.
  3. However, the set requires $f(0) = 1$.
  4. Since the zero function is not in the set, it cannot be a vector space.

Answer: No, it is not a vector space.

L55. Subspaces: definition and recognition

Module 4  2026-09-28  ·  10:11  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the set $S = \{ \begin{bmatrix} x \\ y \\ z \end{bmatrix} : 2x - y = 0 \}$ is a subspace of $\mathbb{R}^3$.
Reveal solution
  1. Check zero vector: $2(0) - 0 = 0$, so $0 \in S$.
  2. Check addition: If $2u_1 - u_2 = 0$ and $2v_1 - v_2 = 0$, then $2(u_1+v_1) - (u_2+v_2) = (2u_1-u_2) + (2v_1-v_2) = 0 + 0 = 0$.
  3. Check scalar multiplication: If $2x - y = 0$, then $2(cx) - (cy) = c(2x-y) = c(0) = 0$.

Answer: Yes, it is a subspace.

Problem 2. Is the set $S = \{ \begin{bmatrix} x \\ y \end{bmatrix} : x^2 = y \}$ a subspace of $\mathbb{R}^2$?
Reveal solution
  1. Check zero vector: $0^2 = 0$, so $0 \in S$.
  2. Check scalar multiplication: Let $v = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$. This is in $S$ because $1^2 = 1$.
  3. Multiply by $c=2$: $2v = \begin{bmatrix} 2 \\ 2 \end{bmatrix}$. Check if $2^2 = 2$. Since $4 \neq 2$, the vector $2v$ is not in $S$.

Answer: No, it is not a subspace.

Problem 3. Let $S$ be the set of all vectors in $\mathbb{R}^3$ that are perpendicular to the vector $n = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}$. Is $S$ a subspace?
Reveal solution
  1. A vector $v$ is in $S$ if $n \cdot v = 0$.
  2. Zero vector: $n \cdot 0 = 0$, so $0 \in S$.
  3. Addition: If $n \cdot u = 0$ and $n \cdot v = 0$, then $n \cdot (u+v) = n \cdot u + n \cdot v = 0 + 0 = 0$.
  4. Scalar multiplication: If $n \cdot v = 0$, then $n \cdot (cv) = c(n \cdot v) = c(0) = 0$.

Answer: Yes, it is a subspace.

L56. The null space of a matrix

Module 4  2026-09-29  ·  10:59  ·  practice PDF

Practice problems (3)
Problem 1. Find the null space of the matrix $A = \begin{pmatrix} 1 & -3 \\ 2 & -6 \end{pmatrix}$.
Reveal solution
  1. Perform row reduction: $R_2 \leftarrow R_2 - 2R_1$ gives $\begin{pmatrix} 1 & -3 \\ 0 & 0 \end{pmatrix}$.
  2. Identify variables: $x_1$ is a pivot variable, $x_2$ is a free variable.
  3. Solve for $x_1$: $x_1 - 3x_2 = 0 \implies x_1 = 3x_2$.
  4. Write in vector form: $x = \begin{pmatrix} 3x_2 \\ x_2 \end{pmatrix} = x_2 \begin{pmatrix} 3 \\ 1 \end{pmatrix}$.

Answer: \text{Null}(A) = \text{span} \left\{ \begin{pmatrix} 3 \\ 1 \end{pmatrix} \right\}

Problem 2. Find a basis for the null space of $A = \begin{pmatrix} 1 & 0 & 2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{pmatrix}$.
Reveal solution
  1. The matrix is already in RREF.
  2. Pivot variables are $x_1$ and $x_2$; the free variable is $x_3$.
  3. From row 1: $x_1 + 2x_3 = 0 \implies x_1 = -2x_3$.
  4. From row 2: $x_2 - x_3 = 0 \implies x_2 = x_3$.
  5. The general solution is $x = x_3 \begin{pmatrix} -2 \\ 1 \\ 1 \end{pmatrix}$.

Answer: \left\{ \begin{pmatrix} -2 \\ 1 \\ 1 \end{pmatrix} \right\}

Problem 3. Determine the null space of $A = \begin{pmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & 3 \\ 0 & 0 & 0 & 0 \end{pmatrix}$.
Reveal solution
  1. The matrix is in RREF. Pivots are in columns 1 and 3.
  2. Free variables are $x_2$ and $x_4$.
  3. Row 1: $x_1 + 2x_2 + x_4 = 0 \implies x_1 = -2x_2 - x_4$.
  4. Row 2: $x_3 + 3x_4 = 0 \implies x_3 = -3x_4$.
  5. Vector form: $x = x_2 \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + x_4 \begin{pmatrix} -1 \\ 0 \\ -3 \\ 1 \end{pmatrix}$.

Answer: \text{Null}(A) = \text{span} \left\{ \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ -3 \\ 1 \end{pmatrix} \right\}

L57. The column space of a matrix

Module 4  2026-09-30  ·  9:45  ·  practice PDF

Practice problems (3)
Problem 1. Given $A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix}$ and $b = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}$, is $b$ in the column space of $A$? Justify your answer.
Reveal solution
  1. We check if $x_1 \begin{bmatrix} 1 \\ 3 \\ 5 \end{bmatrix} + x_2 \begin{bmatrix} 2 \\ 4 \\ 6 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}$.
  2. From the first row: $x_1 + 2x_2 = 1$.
  3. From the second row: $3x_1 + 4x_2 = 2$.
  4. Subtracting 3 times the first from the second: $(3-3)x_1 + (4-6)x_2 = 2-3$, so $-2x_2 = -1$, which means $x_2 = 0.5$.
  5. Substituting back: $x_1 + 2(0.5) = 1$, so $x_1 = 0$.
  6. Check the third row: $5(0) + 6(0.5) = 3$. This matches the third component of $b$.

Answer: Yes, $b$ is in the column space because $b = 0 v_1 + 0.5 v_2$.

Problem 2. Find a basis for the column space of $A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 1 & 3 & 4 \end{bmatrix}$.
Reveal solution
  1. Perform row reduction: $R_3 \to R_3 - R_1$ gives $\begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \end{bmatrix}$.
  2. Next, $R_3 \to R_3 - R_2$ gives $\begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  3. The pivots are in the first and second columns.
  4. The basis for the column space consists of the first and second columns of the original matrix.

Answer: \left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix} \right\}

Problem 3. If a $4 \times 3$ matrix $A$ has rank 2, what is the geometric nature of its column space in $\mathbb{R}^4$?
Reveal solution
  1. The column space is a subspace of $\mathbb{R}^4$ because the columns have 4 components.
  2. The dimension of the column space is equal to the rank of the matrix.
  3. Since the rank is 2, the dimension of the column space is 2.

Answer: The column space is a 2-dimensional plane passing through the origin in 4-dimensional space.

L58. Linear independence I — concept and geometric meaning

Module 4  2026-10-01  ·  9:46  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the vectors $v_1 = \begin{pmatrix} 2 \\ 3 \end{pmatrix}$ and $v_2 = \begin{pmatrix} 4 \\ 6 \end{pmatrix}$ are linearly independent.
Reveal solution
  1. Check if $v_2$ is a scalar multiple of $v_1$.
  2. Observe that $2 \times 2 = 4$ and $2 \times 3 = 6$.
  3. Thus, $v_2 = 2 v_1$.
  4. Since one vector is a multiple of the other, they are linearly dependent.

Answer: Linearly dependent

Problem 2. Check the linear independence of $v_1 = (1, 0, 0)$, $v_2 = (0, 1, 0)$, and $v_3 = (1, 1, 0)$.
Reveal solution
  1. Stack the vectors as rows of a matrix $A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 0 \end{pmatrix}$.
  2. Perform row reduction: $R_3 \leftarrow R_3 - R_1$ gives $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{pmatrix}$.
  3. Then $R_3 \leftarrow R_3 - R_2$ gives $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}$.
  4. The presence of a zero row indicates linear dependence.

Answer: Linearly dependent

Problem 3. Determine if the vectors $v_1 = (1, 2, 1)$, $v_2 = (0, 1, 1)$, and $v_3 = (1, 0, -1)$ are linearly independent using the determinant.
Reveal solution
  1. Form the matrix $A = \begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & -1 \end{pmatrix}$.
  2. Compute the determinant: $1(1(-1) - 1(0)) - 2(0(-1) - 1(1)) + 1(0(0) - 1(1))$.
  3. This equals $1(-1) - 2(-1) + 1(-1) = -1 + 2 - 1 = 0$.
  4. Since the determinant is zero, the vectors are linearly dependent.

Answer: Linearly dependent

L59. Linear independence II — testing with elimination

Module 4  2026-10-02  ·  10:51  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the following vectors in $\mathbb{R}^3$ are linearly independent: $v_1 = [1, 0, 1]^T$, $v_2 = [1, 1, 0]^T$, and $v_3 = [0, 1, 1]^T$.
Reveal solution
  1. Form the matrix $A = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix}$.
  2. Perform $R_3 \leftarrow R_3 - R_1$ to get $\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 0 & -1 & 1 \end{bmatrix}$.
  3. Perform $R_3 \leftarrow R_3 + R_2$ to get $\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 2 \end{bmatrix}$.
  4. There are 3 pivots for 3 vectors.

Answer: Linearly Independent

Problem 2. Check the linear independence of $v_1 = [1, 2]^T$ and $v_2 = [3, 6]^T$.
Reveal solution
  1. Form the matrix $A = \begin{bmatrix} 1 & 3 \\ 2 & 6 \end{bmatrix}$.
  2. Perform $R_2 \leftarrow R_2 - 2R_1$ to get $\begin{bmatrix} 1 & 3 \\ 0 & 0 \end{bmatrix}$.
  3. There is only 1 pivot, but there are 2 vectors.

Answer: Linearly Dependent

Problem 3. Given $v_1 = [1, 0, 0]^T$, $v_2 = [1, 1, 0]^T$, and $v_3 = [1, 1, 1]^T$, are they linearly independent? Explain using pivots.
Reveal solution
  1. Form the matrix $A = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}$.
  2. The matrix is already in row echelon form.
  3. There are pivots in every column (the diagonal entries are all 1).
  4. Since the number of pivots equals the number of vectors, they are independent.

Answer: Linearly Independent

L60. Basis: minimal spanning sets

Module 4  2026-10-03  ·  10:54  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the set $S = \{ \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \end{bmatrix} \}$ is a basis for $\mathbb{R}^2$.
Reveal solution
  1. Form a matrix $A$ with the vectors as columns: $A = \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}$.
  2. Calculate the determinant: $\det(A) = (2)(3) - (1)(1) = 6 - 1 = 5$.
  3. Since the determinant is non-zero, the vectors are linearly independent.
  4. In $\mathbb{R}^2$, any two linearly independent vectors span the space.
  5. Therefore, the set is a basis.

Answer: Yes, it is a basis.

Problem 2. Find the coordinates of the vector $w = \begin{bmatrix} 4 \\ 10 \end{bmatrix}$ relative to the basis $B = \{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \end{bmatrix} \}$.
Reveal solution
  1. Set up the equation $c_1 \begin{bmatrix} 1 \\ 2 \end{bmatrix} + c_2 \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 4 \\ 10 \end{bmatrix}$.
  2. From the second component: $2c_1 + 0c_2 = 10$, which implies $c_1 = 5$.
  3. From the first component: $1c_1 + 1c_2 = 4$.
  4. Substitute $c_1 = 5$: $5 + c_2 = 4$, which implies $c_2 = -1$.
  5. The coordinates are $c_1 = 5$ and $c_2 = -1$.

Answer: \begin{bmatrix} 5 \\ -1 \end{bmatrix}

Problem 3. Does the set $S = \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} \}$ form a basis for $\mathbb{R}^3$?
Reveal solution
  1. Check for linear independence by calculating the determinant of the matrix $A = \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  2. The determinant of an upper triangular matrix is the product of the diagonal: $1 \cdot 1 \cdot 0 = 0$.
  3. Since the determinant is zero, the vectors are linearly dependent.
  4. A basis must be linearly independent.
  5. Therefore, the set is not a basis.

Answer: No, it is not a basis.

L61. Dimension — and why it's well-defined

Module 4  2026-10-04  ·  11:03  ·  practice PDF

Practice problems (3)
Problem 1. Find the dimension of the subspace $V$ of $\mathbb{R}^3$ defined by the equation $2x - y + 3z = 0$.
Reveal solution
  1. Solve for one variable in terms of the others: $y = 2x + 3z$.
  2. Write a general vector in $V$: $(x, 2x + 3z, z)$.
  3. Decompose into linear combinations: $x(1, 2, 0) + z(0, 3, 1)$.
  4. The vectors $(1, 2, 0)$ and $(0, 3, 1)$ are linearly independent and span $V$.
  5. The basis has 2 vectors.

Answer: 2

Problem 2. Given a $4 \times 7$ matrix $A$ with a rank of 3, what is the dimension of the null space of $A$?
Reveal solution
  1. Use the Rank-Nullity Theorem: $\text{rank}(A) + \text{dim}(\text{Null } A) = n$, where $n$ is the number of columns.
  2. Substitute the known values: $3 + \text{dim}(\text{Null } A) = 7$.
  3. Solve for the dimension of the null space: $7 - 3 = 4$.

Answer: 4

Problem 3. Determine the dimension of the subspace of $\mathbb{R}^3$ spanned by the vectors $v_1 = (1, 0, 0)$, $v_2 = (0, 1, 0)$, and $v_3 = (1, 1, 0)$.
Reveal solution
  1. Check for linear independence: $v_3 = v_1 + v_2$.
  2. Since $v_3$ is a linear combination of $v_1$ and $v_2$, the set is linearly dependent.
  3. The spanning set can be reduced to the linearly independent set $\{v_1, v_2\}$.
  4. This set forms a basis for the subspace.
  5. The number of vectors in the basis is 2.

Answer: 2

L62. Finding bases for null space and column space

Module 4  2026-10-05  ·  10:22  ·  practice PDF

Practice problems (3)
Problem 1. Find a basis for the column space and the null space of the matrix $A = \begin{pmatrix} 1 & 3 & 1 \\ 2 & 6 & 0 \\ 1 & 3 & -1 \end{pmatrix}$.
Reveal solution
  1. Perform row reduction: $R2 \to R2 - 2R1$ and $R3 \to R3 - R1$ gives $\begin{pmatrix} 1 & 3 & 1 \\ 0 & 0 & -2 \\ 0 & 0 & -2 \end{pmatrix}$.
  2. Further reduce to RREF: $R2 \to -0.5 R2$ and $R3 \to R3 - R2$ and $R1 \to R1 - R2$ gives $\begin{pmatrix} 1 & 3 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix}$.
  3. Pivots are in columns 1 and 3. The basis for $\text{Col}(A)$ is the 1st and 3rd columns of the original matrix: $\left\{ \begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} \right\}$.
  4. For the null space, $x_2$ is free. $x_1 + 3x_2 = 0 \implies x_1 = -3x_2$ and $x_3 = 0$.
  5. Setting $x_2 = 1$ gives the special solution $\begin{pmatrix} -3 \\ 1 \\ 0 \end{pmatrix}$. This is the basis for $\text{Null}(A)$.

Answer: \text{Col basis: } \left\{ \begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} \right\}, \text{Null basis: } \left\{ \begin{pmatrix} -3 \\ 1 \\ 0 \end{pmatrix} \right\}

Problem 2. Given a $4 \times 4$ matrix $A$ with $\text{rank}(A) = 2$, how many vectors will be in a basis for the null space? Explain your reasoning.
Reveal solution
  1. The rank of a matrix is the dimension of its column space, so $\text{dim}(\text{Col } A) = 2$.
  2. The rank-nullity theorem states that $\text{dim}(\text{Col } A) + \text{dim}(\text{Null } A) = n$, where $n$ is the number of columns.
  3. Here $n = 4$, so $2 + \text{dim}(\text{Null } A) = 4$.
  4. Therefore, $\text{dim}(\text{Null } A) = 2$.

Answer: 2 vectors

Problem 3. Find a basis for the null space of $A = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}$.
Reveal solution
  1. Reduce to RREF: $R2 \to R2 - 2R1$ gives $\begin{pmatrix} 1 & 2 \\ 0 & 0 \end{pmatrix}$.
  2. The pivot is in column 1, so $x_2$ is a free variable.
  3. The equation is $x_1 + 2x_2 = 0$, which means $x_1 = -2x_2$.
  4. Setting $x_2 = 1$ gives the vector $\begin{pmatrix} -2 \\ 1 \end{pmatrix}$.

Answer: \left\{ \begin{pmatrix} -2 \\ 1 \end{pmatrix} \right\}

L63. The row space; rank of a matrix

Module 4  2026-10-06  ·  9:49  ·  practice PDF

Practice problems (3)
Problem 1. Find the rank and a basis for the row space of the matrix $A = \begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 3 & 6 & 3 \end{bmatrix}$.
Reveal solution
  1. Perform row operations: $R_2 \leftarrow R_2 - 2R_1$ and $R_3 \leftarrow R_3 - 3R_1$.
  2. The resulting matrix is $\begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$.
  3. There is only one non-zero row, so the rank is 1.
  4. The basis for the row space is the set containing the single non-zero row.

Answer: \text{rank}(A) = 1, \text{Basis}(\text{Row } A) = \{ (1, 2, 1) \}

Problem 2. Given a $4 \times 6$ matrix $B$ with 3 pivots, what is the dimension of the row space and the dimension of the column space?
Reveal solution
  1. The number of pivots is given as 3.
  2. The dimension of the column space is equal to the number of pivots.
  3. The dimension of the row space is also equal to the number of pivots.
  4. Therefore, both dimensions are 3.

Answer: \text{dim}(\text{Row } B) = 3, \text{dim}(\text{Col } B) = 3

Problem 3. Find a basis for the row space of $C = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 2 \end{bmatrix}$.
Reveal solution
  1. Perform row operations: $R_3 \leftarrow R_3 - R_1$.
  2. The matrix becomes $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \end{bmatrix}$.
  3. Perform $R_3 \leftarrow R_3 - R_2$.
  4. The RREF is $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  5. The non-zero rows are $(1, 0, 1)$ and $(0, 1, 1)$.

Answer: \text{Basis}(\text{Row } C) = \{ (1, 0, 1), (0, 1, 1) \}

L64. The Rank-Nullity theorem — the great accounting identity

Module 4  2026-10-07  ·  9:29  ·  practice PDF

Practice problems (3)
Problem 1. A matrix $A$ has $6$ columns and a rank of $4$. What is the nullity of $A$?
Reveal solution
  1. Identify the number of columns $n = 6$.
  2. Identify the rank $\text{rank}(A) = 4$.
  3. Apply the Rank-Nullity Theorem: $\text{rank}(A) + \text{nullity}(A) = n$.
  4. Substitute the values: $4 + \text{nullity}(A) = 6$.
  5. Solve for nullity: $\text{nullity}(A) = 6 - 4 = 2$.

Answer: 2

Problem 2. A $4 \times 7$ matrix $A$ has a null space spanned by the vectors $[1, 0, 0, 0, 0, 0, 0]^T$, $[0, 1, 0, 0, 0, 0, 0]^T$, and $[0, 0, 1, 0, 0, 0, 0]^T$. Find the rank of $A$.
Reveal solution
  1. The null space is spanned by $3$ linearly independent vectors, so $\text{nullity}(A) = 3$.
  2. The number of columns $n$ is $7$.
  3. Apply the Rank-Nullity Theorem: $\text{rank}(A) + 3 = 7$.
  4. Solve for rank: $\text{rank}(A) = 7 - 3 = 4$.

Answer: 4

Problem 3. Let $A$ be a $3 \times 3$ matrix. If the system $Ax = 0$ has only the trivial solution, what is the rank of $A$?
Reveal solution
  1. If $Ax = 0$ has only the trivial solution, the null space contains only the zero vector.
  2. The dimension of the zero subspace is $0$, so $\text{nullity}(A) = 0$.
  3. The number of columns $n$ is $3$.
  4. Apply the Rank-Nullity Theorem: $\text{rank}(A) + 0 = 3$.
  5. Therefore, $\text{rank}(A) = 3$.

Answer: 3

L65. The four fundamental subspaces (the big picture)

Module 4  2026-10-08  ·  10:44  ·  practice PDF

Practice problems (3)
Problem 1. Given the matrix $A = \begin{bmatrix} 1 & 2 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 1 & 3 & 1 & 1 \end{bmatrix}$, find the dimensions of $C(A)$, $C(A^T)$, $N(A)$, and $N(A^T)$.
Reveal solution
  1. Perform row reduction: $R3 \leftarrow R3 - R1$ gives $\begin{bmatrix} 1 & 2 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \end{bmatrix}$.
  2. Further reduction: $R3 \leftarrow R3 - R2$ gives $\begin{bmatrix} 1 & 2 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}$.
  3. There are 2 pivots, so $\text{rank}(A) = r = 2$.
  4. The matrix has $m=3$ rows and $n=4$ columns.
  5. $\text{dim}(C(A)) = r = 2$ and $\text{dim}(C(A^T)) = r = 2$.
  6. $\text{dim}(N(A)) = n - r = 4 - 2 = 2$ and $\text{dim}(N(A^T)) = m - r = 3 - 2 = 1$.

Answer: \text{dim}(C(A))=2, \text{dim}(C(A^T))=2, \text{dim}(N(A))=2, \text{dim}(N(A^T))=1

Problem 2. A matrix $A$ has 7 rows and 12 columns. If the dimension of the null space is 5, what are the dimensions of the other three fundamental subspaces?
Reveal solution
  1. We are given $n = 12$, $m = 7$, and $\text{dim}(N(A)) = 5$.
  2. Using the rank-nullity theorem: $r + 5 = 12$, so $r = 7$.
  3. The dimension of the column space $C(A)$ is $r = 7$.
  4. The dimension of the row space $C(A^T)$ is $r = 7$.
  5. The dimension of the left null space $N(A^T)$ is $m - r = 7 - 7 = 0$.

Answer: \text{dim}(C(A))=7, \text{dim}(C(A^T))=7, \text{dim}(N(A^T))=0

Problem 3. If $A$ is a square $n \times n$ matrix and the left null space $N(A^T)$ contains only the zero vector, what can you conclude about the other three subspaces?
Reveal solution
  1. If $N(A^T) = \{0\}$, then $\text{dim}(N(A^T)) = 0$.
  2. Since $\text{dim}(N(A^T)) = m - r$ and $m = n$, we have $n - r = 0$, which means $r = n$.
  3. Since $r = n$, the column space $C(A)$ has dimension $n$, meaning $C(A) = \mathbb{R}^n$.
  4. The row space $C(A^T)$ also has dimension $n$, meaning $C(A^T) = \mathbb{R}^n$.
  5. The null space $N(A)$ has dimension $n - r = n - n = 0$, meaning $N(A) = \{0\}$.

Answer: All four subspaces are determined: $C(A)=\mathbb{R}^n, C(A^T)=\mathbb{R}^n, N(A)=\{0\}, N(A^T)=\{0\}$

L66. Coordinates relative to a basis

Module 4  2026-10-09  ·  12:24  ·  practice PDF

Practice problems (3)
Problem 1. Find the coordinates of the vector $v = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$ relative to the basis $B = \left\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 2 \\ 0 \end{bmatrix} \right\}$.
Reveal solution
  1. Set up the equation $\begin{bmatrix} 1 & 2 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$.
  2. From the second row, $1 c_1 + 0 c_2 = 2$, so $c_1 = 2$.
  3. Substitute $c_1 = 2$ into the first row: $2 + 2 c_2 = 5$.
  4. Subtract 2 from both sides: $2 c_2 = 3$.
  5. Divide by 2: $c_2 = 1.5$.

Answer: $[v]_B = \begin{bmatrix} 2 \\ 1.5 \end{bmatrix}$

Problem 2. Given the basis $B = \left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \right\}$, find the coordinates of $v = \begin{bmatrix} 2 \\ 2 \\ 3 \end{bmatrix}$.
Reveal solution
  1. Set up the system $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \\ 3 \end{bmatrix}$.
  2. Subtract row 1 from row 3: $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & -1 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \\ 1 \end{bmatrix}$.
  3. Subtract row 2 from row 3: $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & -2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \\ -1 \end{bmatrix}$.
  4. Solve for $c_3$: $-2 c_3 = -1 \implies c_3 = 0.5$.
  5. Solve for $c_2$: $c_2 + 0.5 = 2 \implies c_2 = 1.5$.
  6. Solve for $c_1$: $c_1 + 0.5 = 2 \implies c_1 = 1.5$.

Answer: $[v]_B = \begin{bmatrix} 1.5 \\ 1.5 \\ 0.5 \end{bmatrix}$

Problem 3. If a vector $v$ has coordinates $[v]_B = \begin{bmatrix} 3 \\ -2 \end{bmatrix}$ relative to the basis $B = \left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\}$, what are its coordinates relative to the standard basis?
Reveal solution
  1. The coordinates relative to the standard basis are simply the vector $v$ itself.
  2. Use the formula $v = P [v]_B$.
  3. Calculate $v = 3 \begin{bmatrix} 1 \\ 2 \end{bmatrix} + (-2) \begin{bmatrix} 0 \\ 1 \end{bmatrix}$.
  4. Compute the components: $x = 3(1) + (-2)(0) = 3$ and $y = 3(2) + (-2)(1) = 6 - 2 = 4$.
  5. The vector is $\begin{bmatrix} 3 \\ 4 \end{bmatrix}$.

Answer: $[v]_{std} = \begin{bmatrix} 3 \\ 4 \end{bmatrix}$

L67. Change of basis I — the idea and the matrix

Module 4  2026-10-10  ·  9:43  ·  practice PDF

Practice problems (3)
Problem 1. Given basis $B_1 = \{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 3 \\ 5 \end{bmatrix} \}$ and basis $B_2 = \{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix} \}$, find the change of basis matrix $P_{B_2 \leftarrow B_1}$.
Reveal solution
  1. Find coordinates of $\begin{bmatrix} 1 \\ 2 \end{bmatrix}$ relative to $B_2$: $1\begin{bmatrix} 1 \\ 1 \end{bmatrix} + 1\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$, so the first column is $\begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
  2. Find coordinates of $\begin{bmatrix} 3 \\ 5 \end{bmatrix}$ relative to $B_2$: $3\begin{bmatrix} 1 \\ 1 \end{bmatrix} + 2\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 3 \\ 5 \end{bmatrix}$, so the second column is $\begin{bmatrix} 3 \\ 2 \end{bmatrix}$.
  3. Assemble the matrix.

Answer: \begin{bmatrix} 1 & 3 \\ 1 & 2 \end{bmatrix}

Problem 2. If the change of basis matrix from $B_1$ to $B_2$ is $P = \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}$, and a vector $v$ has coordinates $[v]_{B_1} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}$, find $[v]_{B_2}$.
Reveal solution
  1. Use the formula $[v]_{B_2} = P_{B_2 \leftarrow B_1} [v]_{B_1}$.
  2. Compute the product $\begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} \begin{bmatrix} 1 \\ -1 \end{bmatrix}$.
  3. The first component is $2(1) + 1(-1) = 1$.
  4. The second component is $0(1) + 3(-1) = -3$.

Answer: \begin{bmatrix} 1 \\ -3 \end{bmatrix}

Problem 3. Let $P_1 = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$ and $P_2 = \begin{bmatrix} 2 & 0 \\ 1 & 1 \end{bmatrix}$ be matrices whose columns are the bases $B_1$ and $B_2$ respectively. Find the change of basis matrix $P_{B_1 \leftarrow B_2}$.
Reveal solution
  1. The matrix from $B_2$ to $B_1$ is $P_{B_1 \leftarrow B_2} = P_1^{-1} P_2$.
  2. Compute $P_1^{-1}$: for $\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$, the inverse is $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}$.
  3. Multiply $P_1^{-1}$ by $P_2$: $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 1 & 1 \end{bmatrix}$.
  4. Top left: $1(2) + (-1)(1) = 1$. Top right: $1(0) + (-1)(1) = -1$.
  5. Bottom left: $0(2) + 1(1) = 1$. Bottom right: $0(0) + 1(1) = 1$.

Answer: \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}

L68. Change of basis II — worked examples

Module 4  2026-10-11  ·  11:05  ·  practice PDF

Practice problems (3)
Problem 1. Given basis $B_1 = \{ [2, 1]^T, [1, 2]^T \}$ and the standard basis $B_2 = \{ [1, 0]^T, [0, 1]^T \}$, find the change of basis matrix $P_{B_2 \leftarrow B_1}$.
Reveal solution
  1. The matrix $P_1$ has columns $[2, 1]^T$ and $[1, 2]^T$.
  2. The matrix $P_2$ is the identity matrix $I$.
  3. The formula is $P_{B_2 \leftarrow B_1} = P_2^{-1} P_1 = I^{-1} P_1 = P_1$.
  4. Therefore, the matrix is simply the matrix of $B_1$ vectors.

Answer: \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}

Problem 2. Let $B_1 = \{ [1, 1]^T, [0, 1]^T \}$ and $B_2 = \{ [1, 0]^T, [1, 1]^T \}$. Find the change of basis matrix $P_{B_2 \leftarrow B_1}$.
Reveal solution
  1. Construct $P_1 = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}$ and $P_2 = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$.
  2. Compute $P_2^{-1}$. The determinant is $1(1) - 1(0) = 1$. The inverse is $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}$.
  3. Multiply $P_2^{-1} P_1$: $\begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 1-1 & 0-1 \\ 0+1 & 0+1 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 1 & 1 \end{bmatrix}$.

Answer: \begin{bmatrix} 0 & -1 \\ 1 & 1 \end{bmatrix}

Problem 3. A vector $v$ has coordinates $[v]_{B_1} = [3, -2]^T$ relative to $B_1 = \{ [1, 2]^T, [3, 4]^T \}$. Find its coordinates relative to $B_2 = \{ [1, 0]^T, [0, 1]^T \}$.
Reveal solution
  1. The change of basis matrix from $B_1$ to the standard basis $B_2$ is $P_1 = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}$.
  2. The coordinates in $B_2$ are found by $[v]_{B_2} = P_1 [v]_{B_1}$.
  3. Compute the product: $\begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} \begin{bmatrix} 3 \\ -2 \end{bmatrix} = \begin{bmatrix} 1(3) + 3(-2) \\ 2(3) + 4(-2) \end{bmatrix} = \begin{bmatrix} 3-6 \\ 6-8 \end{bmatrix} = \begin{bmatrix} -3 \\ -2 \end{bmatrix}$.

Answer: \begin{bmatrix} -3 \\ -2 \end{bmatrix}

L69. Function spaces and other exotic vector spaces

Module 4  2026-10-12  ·  10:32  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the polynomials $p_1 = 1+x^2$, $p_2 = x+x^2$, and $p_3 = 1+x$ are linearly independent in the space of polynomials of degree 2 or less.
Reveal solution
  1. Convert polynomials to coordinate vectors relative to basis $\{1, x, x^2\}$: $[p_1] = [1, 0, 1]^T$, $[p_2] = [0, 1, 1]^T$, $[p_3] = [1, 1, 0]^T$.
  2. Form matrix $A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{bmatrix}$.
  3. Perform row reduction: $R_3 \leftarrow R_3 - R_1$ gives $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & -1 \end{bmatrix}$.
  4. Then $R_3 \leftarrow R_3 - R_2$ gives $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & -2 \end{bmatrix}$.
  5. Since there are 3 pivots, the vectors are linearly independent.

Answer: Yes, they are linearly independent.

Problem 2. Find the coordinates of the polynomial $p(x) = 4 + 2x - 3x^2$ relative to the basis $B = \{1, 1+x, 1+x+x^2\}$.
Reveal solution
  1. Set up the equation $4 + 2x - 3x^2 = c_1(1) + c_2(1+x) + c_3(1+x+x^2)$.
  2. Equate coefficients of $x^2$: $c_3 = -3$.
  3. Equate coefficients of $x$: $c_2 + c_3 = 2 \implies c_2 - 3 = 2 \implies c_2 = 5$.
  4. Equate constants: $c_1 + c_2 + c_3 = 4 \implies c_1 + 5 - 3 = 4 \implies c_1 + 2 = 4 \implies c_1 = 2$.
  5. The coordinate vector is $[2, 5, -3]^T$.

Answer: [2, 5, -3]^T

Problem 3. Consider the space of polynomials of degree 3 or less. Is the set $\{1+x, x+x^2, x^2+x^3, 1+x^3\}$ linearly independent?
Reveal solution
  1. Convert to coordinate vectors in $\mathbb{R}^4$: $v_1=[1,1,0,0]^T, v_2=[0,1,1,0]^T, v_3=[0,0,1,1]^T, v_4=[1,0,0,1]^T$.
  2. Form matrix $A = \begin{bmatrix} 1 & 0 & 0 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix}$.
  3. Row reduce: $R_2 \leftarrow R_2 - R_1$ gives $\begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix}$.
  4. Then $R_3 \leftarrow R_3 - R_2$ gives $\begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{bmatrix}$.
  5. Then $R_4 \leftarrow R_4 - R_3$ gives $\begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix}$.
  6. There are only 3 pivots for 4 vectors, so they are linearly dependent.

Answer: No, they are linearly dependent.

L70. Module 4 review + self-test

Module 4  2026-10-13  ·  10:41  ·  practice PDF

Practice problems (3)
Problem 1. Let $S$ be the subspace of $\mathbb{R}^3$ defined by $x+y+z=0$. Determine if the set $B = \{ [-1, 1, 0]^T, [-1, 0, 1]^T \}$ is a basis for $S$.
Reveal solution
  1. First, check if the vectors are in $S$. For $[-1, 1, 0]^T$, $-1+1+0=0$. For $[-1, 0, 1]^T$, $-1+0+1=0$. Both are in $S$.
  2. Check for linear independence. Since neither vector is a scalar multiple of the other, they are linearly independent.
  3. Determine the dimension of $S$. $S$ is a plane in $\mathbb{R}^3$ defined by one equation, so $\text{dim}(S) = 3 - 1 = 2$.
  4. Since we have 2 linearly independent vectors in a 2-dimensional space, they must form a basis.

Answer: Yes, it is a basis.

Problem 2. Find the rank and nullity of the matrix $A = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 3 & 2 \end{bmatrix}$.
Reveal solution
  1. Perform row reduction. $R_3 \leftarrow R_3 - R_1$ gives $\begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \end{bmatrix}$.
  2. Then $R_3 \leftarrow R_3 - R_2$ gives $\begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  3. There are 2 pivots, so $\text{rank}(A) = 2$.
  4. The matrix has 3 columns, so $\text{nullity}(A) = 3 - 2 = 1$.

Answer: \text{rank}=2, \text{nullity}=1

Problem 3. Given basis $B_1 = \{ [1, 0]^T, [0, 1]^T \}$ and $B_2 = \{ [1, 1]^T, [1, -1]^T \}$, find the change of basis matrix $P_{B_2 \leftarrow B_1}$.
Reveal solution
  1. We need to express vectors of $B_1$ in terms of $B_2$.
  2. For $[1, 0]^T$: $c_1[1, 1]^T + c_2[1, -1]^T = [1, 0]^T$. This gives $c_1+c_2=1$ and $c_1-c_2=0$, so $c_1=0.5, c_2=0.5$.
  3. For $[0, 1]^T$: $c_1[1, 1]^T + c_2[1, -1]^T = [0, 1]^T$. This gives $c_1+c_2=0$ and $c_1-c_2=1$, so $c_1=0.5, c_2=-0.5$.
  4. The matrix $P$ is formed by these coordinate vectors as columns.

Answer: \begin{bmatrix} 0.5 & 0.5 \\ 0.5 & -0.5 \end{bmatrix}

Module 5 — Linear Transformations (12/12)

L71. Linear transformations: functions that respect the grid

Module 5  2026-10-14  ·  11:14  ·  practice PDF

Practice problems (3)
Problem 1. Given the linear transformation matrix $A = \begin{bmatrix} 2 & -3 \\ 1 & 4 \end{bmatrix}$, find the image of the vector $\mathbf{v} = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$.
Reveal solution
  1. Multiply the matrix $A$ by the vector $\mathbf{v}$ using the column picture.
  2. The result is $5 \begin{bmatrix} 2 \\ 1 \end{bmatrix} + 2 \begin{bmatrix} -3 \\ 4 \end{bmatrix}$.
  3. Compute the components: $5(2) + 2(-3) = 10 - 6 = 4$ and $5(1) + 2(4) = 5 + 8 = 13$.

Answer: \begin{bmatrix} 4 \\ 13 \end{bmatrix}

Problem 2. A linear transformation $T$ maps $\mathbf{i} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ to $\begin{bmatrix} 0 \\ 2 \end{bmatrix}$ and $\mathbf{j} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$ to $\begin{bmatrix} -1 \\ 3 \end{bmatrix}$. Find the image of $\mathbf{w} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}$.
Reveal solution
  1. Construct the matrix $A$ using the images of the basis vectors as columns: $A = \begin{bmatrix} 0 & -1 \\ 2 & 3 \end{bmatrix}$.
  2. Multiply $A$ by $\mathbf{w}$: $\begin{bmatrix} 0 & -1 \\ 2 & 3 \end{bmatrix} \begin{bmatrix} 3 \\ -2 \end{bmatrix}$.
  3. Compute the components: $0(3) + (-1)(-2) = 2$ and $2(3) + 3(-2) = 6 - 6 = 0$.

Answer: \begin{bmatrix} 2 \\ 0 \end{bmatrix}

Problem 3. Determine if the function $T\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x^2 \\ y \end{bmatrix}$ is a linear transformation. Justify your answer using the scaling rule.
Reveal solution
  1. Test the homogeneity rule $T(c\mathbf{v}) = cT(\mathbf{v})$.
  2. Let $\mathbf{v} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $c = 2$.
  3. Compute $T(2\mathbf{v}) = T\begin{bmatrix} 2 \\ 0 \end{bmatrix} = \begin{bmatrix} 2^2 \\ 0 \end{bmatrix} = \begin{bmatrix} 4 \\ 0 \end{bmatrix}$.
  4. Compute $2T(\mathbf{v}) = 2 T\begin{bmatrix} 1 \\ 0 \end{bmatrix} = 2 \begin{bmatrix} 1^2 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}$.
  5. Since $\begin{bmatrix} 4 \\ 0 \end{bmatrix} \neq \begin{bmatrix} 2 \\ 0 \end{bmatrix}$, the rule is violated.

Answer: No, it is not a linear transformation.

L72. Every linear map is a matrix (and how to find it)

Module 5  2026-10-15  ·  10:33  ·  practice PDF

Practice problems (3)
Problem 1. Find the standard matrix $A$ for the linear transformation $T: \mathbb{R}^2 \to \mathbb{R}^2$ that scales the $x$-axis by $2$ and the $y$-axis by $3$.
Reveal solution
  1. Find the image of the first basis vector $\mathbf{i} = [1, 0]^T$. Scaling $x$ by $2$ gives $T(\mathbf{i}) = [2, 0]^T$.
  2. Find the image of the second basis vector $\mathbf{j} = [0, 1]^T$. Scaling $y$ by $3$ gives $T(\mathbf{j}) = [0, 3]^T$.
  3. Place these images as the columns of the matrix $A$.

Answer: A = \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}

Problem 2. A linear transformation $T: \mathbb{R}^2 \to \mathbb{R}^2$ is defined by the formula $T(x, y) = (x + 2y, 3x - 4y)$. Find its standard matrix $A$.
Reveal solution
  1. Evaluate $T(1, 0)$ to find the first column: $T(1, 0) = (1 + 2(0), 3(1) - 4(0)) = (1, 3)$.
  2. Evaluate $T(0, 1)$ to find the second column: $T(0, 1) = (0 + 2(1), 3(0) - 4(1)) = (2, -4)$.
  3. Assemble the columns into matrix $A$.

Answer: A = \begin{bmatrix} 1 & 2 \\ 3 & -4 \end{bmatrix}

Problem 3. Find the standard matrix $A$ for a transformation $T: \mathbb{R}^3 \to \mathbb{R}^2$ that maps the basis vector $\mathbf{e}_1$ to $[1, 1]^T$, $\mathbf{e}_2$ to $[0, 1]^T$, and $\mathbf{e}_3$ to $[-1, 0]^T$.
Reveal solution
  1. The images of the basis vectors are given directly as the columns of the matrix.
  2. Column 1 is $[1, 1]^T$.
  3. Column 2 is $[0, 1]^T$.
  4. Column 3 is $[-1, 0]^T$.
  5. Combine these into a $2 \times 3$ matrix.

Answer: A = \begin{bmatrix} 1 & 0 & -1 \\ 1 & 1 & 0 \end{bmatrix}

L73. Rotations, reflections, shears, scalings — the 2D gallery

Module 5  2026-10-16  ·  11:39  ·  practice PDF

Practice problems (3)
Problem 1. Find the standard matrix for a transformation that first reflects the plane across the $y$-axis and then scales the $x$-axis by a factor of $5$.
Reveal solution
  1. The reflection across the $y$-axis is $Ref_y = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$.
  2. The scaling of the $x$-axis by $5$ is $S = \begin{bmatrix} 5 & 0 \\ 0 & 1 \end{bmatrix}$.
  3. The combined transformation is $A = S \cdot Ref_y = \begin{bmatrix} 5 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} -5 & 0 \\ 0 & 1 \end{bmatrix}$.

Answer: \begin{bmatrix} -5 & 0 \\ 0 & 1 \end{bmatrix}

Problem 2. Determine the matrix for a rotation of $180^\circ$ counter-clockwise and describe its effect on any vector $\mathbf{v}$.
Reveal solution
  1. Using $R_\theta$ with $\theta = 180^\circ$, we have $\cos(180^\circ) = -1$ and $\sin(180^\circ) = 0$.
  2. The matrix is $R_{180} = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}$.
  3. Applying this to $\begin{bmatrix} x \\ y \end{bmatrix}$ gives $\begin{bmatrix} -x \\ -y \end{bmatrix}$, which is the negation of the original vector.

Answer: \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}

Problem 3. A transformation $T$ is defined by the matrix $A = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}$. Identify this transformation from the gallery and find the image of the vector $\begin{bmatrix} 3 \\ 4 \end{bmatrix}$.
Reveal solution
  1. The matrix has ones on the diagonal and a non-zero entry in the bottom-left. This is a vertical shear $H_y$ with factor $k=2$.
  2. The image is $A\mathbf{x} = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 3 \\ 4 \end{bmatrix}$.
  3. The new $x$ is $1(3) + 0(4) = 3$.
  4. The new $y$ is $2(3) + 1(4) = 6 + 4 = 10$.

Answer: \begin{bmatrix} 3 \\ 10 \end{bmatrix}

L74. Composition of transformations = matrix multiplication (revisited)

Module 5  2026-10-17  ·  11:31  ·  practice PDF

Practice problems (3)
Problem 1. Find the standard matrix $C$ for the composition of a reflection across the $y$-axis followed by a scaling of the $x$-axis by a factor of $5$.
Reveal solution
  1. The reflection matrix is $A = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$.
  2. The scaling matrix is $B = \begin{bmatrix} 5 & 0 \\ 0 & 1 \end{bmatrix}$.
  3. Since reflection is first, the product is $C = BA$.
  4. Compute $C = \begin{bmatrix} 5 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} -5 & 0 \\ 0 & 1 \end{bmatrix}$.

Answer: \begin{bmatrix} -5 & 0 \\ 0 & 1 \end{bmatrix}

Problem 2. Let $R$ be a rotation by $90^\circ$ counter-clockwise and $H$ be a horizontal shear with factor $k=3$. Compute the matrix for the composition: shear first, then rotate.
Reveal solution
  1. The shear matrix is $H = \begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix}$.
  2. The rotation matrix is $R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$.
  3. The composition is $C = RH$.
  4. Compute $C = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ 1 & 3 \end{bmatrix}$.

Answer: \begin{bmatrix} 0 & -1 \\ 1 & 3 \end{bmatrix}

Problem 3. A transformation $T$ is composed of a scaling by $2$ in both directions, followed by a reflection across the line $y=x$. Find the matrix $M$ and determine if the order of these two specific operations matters.
Reveal solution
  1. Scaling matrix $S = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$.
  2. Reflection across $y=x$ matrix $A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.
  3. Composition $M = AS = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 0 & 2 \\ 2 & 0 \end{bmatrix}$.
  4. Check reverse order: $SA = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 2 \\ 2 & 0 \end{bmatrix}$.
  5. In this specific case, the order does not matter because $S$ is a scalar multiple of the identity matrix.

Answer: \begin{bmatrix} 0 & 2 \\ 2 & 0 \end{bmatrix}, \text{ order does not matter}

L75. Kernel and image; injectivity and surjectivity

Module 5  2026-10-18  ·  11:07  ·  practice PDF

Practice problems (3)
Problem 1. Find the kernel and image of the transformation represented by $A = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 3 & 2 \end{bmatrix}$. Is the map injective? Is it surjective?
Reveal solution
  1. Solve $A\mathbf{x} = \mathbf{0}$ using row reduction. $R_3 \leftarrow R_3 - R_1$ gives $\begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \end{bmatrix}$, then $R_3 \leftarrow R_3 - R_2$ gives $\begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$.
  2. From $R_2$, $x_2 = -x_3$. From $R_1$, $x_1 = -2x_2 - x_3 = -2(-x_3) - x_3 = x_3$.
  3. The kernel is $\text{span} \{ [1, -1, 1]^T \}$. Since it is non-trivial, the map is not injective.
  4. The rank is 2 (two pivots). Since the target space is $\mathbb{R}^3$ and $2 < 3$, the map is not surjective.

Answer: \text{ker}(T) = \text{span} \{ [1, -1, 1]^T \}, \text{im}(T) = \text{span} \{ [1, 0, 1]^T, [2, 1, 3]^T \}, \text{not injective, not surjective}

Problem 2. A linear map $T: \mathbb{R}^2 \to \mathbb{R}^3$ is defined by $T([x, y]^T) = [x+y, x-y, 2x]^T$. Determine if $T$ is injective.
Reveal solution
  1. Set $T([x, y]^T) = [0, 0, 0]^T$.
  2. This gives the system: $x+y=0$, $x-y=0$, and $2x=0$.
  3. From $2x=0$, we have $x=0$. Substituting into $x+y=0$ gives $y=0$.
  4. The only solution is the zero vector $[0, 0]^T$.
  5. Since the kernel is trivial, the map is injective.

Answer: \text{Yes, it is injective.}

Problem 3. If $T: V \to W$ is a linear transformation where $\dim(V) = 4$ and $\dim(\text{ker}(T)) = 1$, is $T$ surjective if $\dim(W) = 3$?
Reveal solution
  1. Use the Rank-Nullity Theorem: $\dim(V) = \text{rank}(T) + \dim(\text{ker}(T))$.
  2. Substitute the known values: $4 = \text{rank}(T) + 1$.
  3. This implies $\text{rank}(T) = 3$.
  4. The dimension of the image is 3, and the dimension of the target space $W$ is also 3.
  5. Since $\text{im}(T) = W$, the map is surjective.

Answer: \text{Yes, it is surjective.}

L76. Invertible transformations — undoing a map

Module 5  2026-10-19  ·  10:14  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the matrix $A = \begin{bmatrix} 1 & 3 \\ 2 & 7 \end{bmatrix}$ is invertible. If it is, find $A^{-1}$.
Reveal solution
  1. Calculate the determinant: $\det(A) = (1)(7) - (3)(2) = 7 - 6 = 1$.
  2. Since $\det(A) \neq 0$, the matrix is invertible.
  3. Apply the 2x2 inverse formula: swap diagonal elements (7 and 1), negate off-diagonal elements (-3 and -2), and divide by the determinant (1).
  4. The result is $A^{-1} = \begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}$.

Answer: A^{-1} = \begin{bmatrix} 7 & -3 \\ -2 & 1 \end{bmatrix}

Problem 2. A linear transformation $T$ is represented by $A = \begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix}$. Explain why $T$ is not invertible and describe the geometry of its image.
Reveal solution
  1. Calculate the determinant: $\det(A) = (2)(2) - (4)(1) = 4 - 4 = 0$.
  2. Because the determinant is zero, the transformation collapses the plane, making it non-invertible.
  3. Observe that the second column $[4, 2]^T$ is exactly twice the first column $[2, 1]^T$.
  4. Therefore, the image of $T$ is the line spanned by the vector $[2, 1]^T$.

Answer: Not invertible because $\det(A)=0$; the image is a line.

Problem 3. Given the transformation $A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$, find the vector $\mathbf{x}$ such that $A\mathbf{x} = \begin{bmatrix} 3 \\ -2 \end{bmatrix}$.
Reveal solution
  1. Identify $A$ as a 90-degree counter-clockwise rotation. Its inverse $A^{-1}$ should be a 90-degree clockwise rotation.
  2. Compute $\det(A) = (0)(0) - (-1)(1) = 1$.
  3. Find $A^{-1} = \frac{1}{1} \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$.
  4. Multiply $A^{-1}$ by the output vector: $\mathbf{x} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} 3 \\ -2 \end{bmatrix} = \begin{bmatrix} (0)(3) + (1)(-2) \\ (-1)(3) + (0)(-2) \end{bmatrix} = \begin{bmatrix} -2 \\ -3 \end{bmatrix}$.

Answer: \mathbf{x} = \begin{bmatrix} -2 \\ -3 \end{bmatrix}

L77. Linear maps in 3D; projections onto planes

Module 5  2026-10-20  ·  11:03  ·  practice PDF

Practice problems (3)
Problem 1. Find the standard matrix $A$ for the orthogonal projection onto the $xz$-plane.
Reveal solution
  1. The normal vector to the $xz$-plane is $\mathbf{n} = [0, 1, 0]^T$.
  2. The projection of $\mathbf{e}_1 = [1, 0, 0]^T$ onto the plane is $[1, 0, 0]^T$ because it already lies in the plane.
  3. The projection of $\mathbf{e}_2 = [0, 1, 0]^T$ onto the plane is the zero vector because it is the normal vector.
  4. The projection of $\mathbf{e}_3 = [0, 0, 1]^T$ onto the plane is $[0, 0, 1]^T$ because it already lies in the plane.
  5. Assembling these as columns gives the matrix.

Answer: \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}

Problem 2. Given a plane with normal vector $\mathbf{n} = [0, 1, 1]^T$, find the projection of the vector $\mathbf{x} = [2, 3, 4]^T$ onto the plane.
Reveal solution
  1. Compute $\mathbf{x} \cdot \mathbf{n} = (2)(0) + (3)(1) + (4)(1) = 7$.
  2. Compute $\mathbf{n} \cdot \mathbf{n} = 0^2 + 1^2 + 1^2 = 2$.
  3. The projection onto the normal is $\text{Proj}_n(\mathbf{x}) = \frac{7}{2}[0, 1, 1]^T = [0, 3.5, 3.5]^T$.
  4. The projection onto the plane is $\mathbf{x} - \text{Proj}_n(\mathbf{x}) = [2, 3, 4]^T - [0, 3.5, 3.5]^T = [2, -0.5, 0.5]^T$.

Answer: [2, -0.5, 0.5]^T

Problem 3. Prove that for any projection matrix $P$ onto a plane, $P^2 = P$.
Reveal solution
  1. Geometrically, $P\mathbf{x}$ is the projection of $\mathbf{x}$ onto the plane $W$.
  2. The resulting vector $P\mathbf{x}$ already lies within the plane $W$.
  3. Projecting a vector that is already in the plane does not change it, so $P(P\mathbf{x}) = P\mathbf{x}$.
  4. Since this holds for all $\mathbf{x}$, we have $P^2 = P$.

Answer: P^2 = P

L78. The matrix of a transformation in a different basis — similarity

Module 5  2026-10-21  ·  10:47  ·  practice PDF

Practice problems (3)
Problem 1. Given the standard matrix $A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}$ and the basis $B = \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \end{pmatrix} \right\}$, find the matrix $B'$ of the transformation relative to $B$.
Reveal solution
  1. Construct $P = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}$.
  2. Compute $P^{-1} = \begin{pmatrix} 1 & 0 \\ -1 & 1 \end{pmatrix}$.
  3. Compute $AP = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}$.
  4. Compute $B' = P^{-1}(AP) = \begin{pmatrix} 1 & 0 \\ -1 & 1 \end{pmatrix} \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix}$.

Answer: \begin{pmatrix} 2 & 1 \\ -1 & 0 \end{pmatrix}

Problem 2. If matrix $A$ is similar to matrix $B'$, and $\det(A) = 5$, what is $\det(B')$? Explain using the properties of determinants.
Reveal solution
  1. Since $A$ and $B'$ are similar, $B' = P^{-1} A P$.
  2. The determinant of a product is the product of the determinants: $\det(B') = \det(P^{-1}) \det(A) \det(P)$.
  3. Since $\det(P^{-1}) = 1/\det(P)$, these terms cancel out.
  4. Therefore, $\det(B') = \det(A) = 5$.

Answer: 5

Problem 3. Find a basis $B$ such that the transformation $A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ is represented by the matrix $B' = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$.
Reveal solution
  1. We need $P$ such that $AP = PB'$.
  2. This means $A v_1 = 1 v_1$ and $A v_2 = -1 v_2$, where $v_1$ and $v_2$ are the columns of $P$.
  3. Solving $A v_1 = v_1$ for $v_1 = [x, y]^T$ gives $y = x$, so $v_1 = [1, 1]^T$ is a solution.
  4. Solving $A v_2 = -v_2$ for $v_2 = [x, y]^T$ gives $y = -x$, so $v_2 = [1, -1]^T$ is a solution.
  5. One such basis is $B = \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ -1 \end{pmatrix} \right\}$.

Answer: \left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ -1 \end{pmatrix} \right\}

L79. Why similar matrices represent the same map

Module 5  2026-10-22  ·  10:41  ·  practice PDF

Practice problems (3)
Problem 1. Given $A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}$ and $B = \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}$, determine if they could be similar by comparing their determinants and traces.
Reveal solution
  1. Compute $\det(A) = (2)(2) - (1)(1) = 3$.
  2. Compute $\det(B) = (3)(1) - (0)(0) = 3$.
  3. Compute $\text{tr}(A) = 2 + 2 = 4$.
  4. Compute $\text{tr}(B) = 3 + 1 = 4$.
  5. Since both the determinant and trace match, the matrices can be similar.

Answer: Yes, they share the same invariants ($\det=3, \text{tr}=4$).

Problem 2. If matrix $A$ has $\det(A) = 5$ and $\text{tr}(A) = 2$, and $B = P^{-1} A P$, what are $\det(B)$ and $\text{tr}(B)$?
Reveal solution
  1. Recall that the determinant is invariant under similarity, so $\det(B) = \det(A) = 5$.
  2. Recall that the trace is invariant under similarity, so $\text{tr}(B) = \text{tr}(A) = 2$.

Answer: \det(B) = 5, \text{tr}(B) = 2

Problem 3. Determine if $A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$ is similar to $B = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$.
Reveal solution
  1. Compute $\det(A) = 1$ and $\det(B) = 1$.
  2. Compute $\text{tr}(A) = 2$ and $\text{tr}(B) = 2$.
  3. The invariants match, but similarity requires $B = P^{-1} A P$.
  4. For $A = I$, $P^{-1} I P = P^{-1} P = I$.
  5. Since $B \neq I$, $A$ and $B$ cannot be similar despite having the same invariants.

Answer: No, because the only matrix similar to the identity matrix is the identity matrix itself.

L80. Transformations of function spaces: the derivative as a matrix

Module 5  2026-10-23  ·  10:43  ·  practice PDF

Practice problems (3)
Problem 1. Given the polynomial $p(x) = 2 + 7x + 5x^2$, use the derivative matrix $D = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}$ to find its derivative.
Reveal solution
  1. Step 1: Write the polynomial as a coordinate vector $\mathbf{v} = \begin{bmatrix} 2 \\ 7 \\ 5 \end{bmatrix}$.
  2. Step 2: Multiply the matrix $D$ by the vector $\mathbf{v}$.
  3. Step 3: The first component is $0(2) + 1(7) + 0(5) = 7$.
  4. Step 4: The second component is $0(2) + 0(7) + 2(5) = 10$.
  5. Step 5: The third component is $0(2) + 0(7) + 0(5) = 0$.
  6. Step 6: The resulting vector $\begin{bmatrix} 7 \\ 10 \\ 0 \end{bmatrix}$ corresponds to the polynomial $7 + 10x$.

Answer: 7 + 10x

Problem 2. Compute the matrix $D^2$ for the space of polynomials of degree 2 or less, and explain what it represents.
Reveal solution
  1. Step 1: Multiply $D$ by itself: $\begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}$.
  2. Step 2: Row 1 times Col 1 is 0, Row 1 times Col 2 is 0, Row 1 times Col 3 is $1(2) = 2$.
  3. Step 3: Row 2 times all columns is 0, Row 3 times all columns is 0.
  4. Step 4: The result is $\begin{bmatrix} 0 & 0 & 2 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}$.
  5. Step 5: This matrix represents the second derivative operator.

Answer: \begin{bmatrix} 0 & 0 & 2 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}

Problem 3. Construct the derivative matrix $D$ for the space of polynomials of degree 3 or less (basis: $1, x, x^2, x^3$).
Reveal solution
  1. Step 1: Find the derivative of each basis element: $D(1)=0, D(x)=1, D(x^2)=2x, D(x^3)=3x^2$.
  2. Step 2: Convert these to coordinate vectors: $\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 2 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 3 \\ 0 \end{bmatrix}$.
  3. Step 3: Place these vectors as columns in a $4 \times 4$ matrix.

Answer: \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 3 \\ 0 & 0 & 0 & 0 \end{bmatrix}

L81. Transformation clinic — identify the matrix from the picture

Module 5  2026-10-24  ·  9:49  ·  practice PDF

Practice problems (3)
Problem 1. A linear transformation maps the basis vector $e_1 = [1, 0]^T$ to $[2, 0]^T$ and the basis vector $e_2 = [0, 1]^T$ to $[1, 1]^T$. Find the standard matrix $A$.
Reveal solution
  1. The first column of the matrix is the image of $e_1$, which is $[2, 0]^T$.
  2. The second column of the matrix is the image of $e_2$, which is $[1, 1]^T$.
  3. Placing these into a matrix gives $A = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}$.

Answer: \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}

Problem 2. A transformation is seen to rotate the plane by $90^\circ$ counter-clockwise and then scale the entire plane by a factor of $3$. What is the resulting matrix $A$?
Reveal solution
  1. A $90^\circ$ rotation maps $[1, 0]^T$ to $[0, 1]^T$ and $[0, 1]^T$ to $[-1, 0]^T$.
  2. Scaling by $3$ multiplies these resulting vectors by $3$.
  3. The new image of $e_1$ is $[0, 3]^T$ and the new image of $e_2$ is $[-3, 0]^T$.
  4. The matrix is $A = \begin{bmatrix} 0 & -3 \\ 3 & 0 \end{bmatrix}$.

Answer: \begin{bmatrix} 0 & -3 \\ 3 & 0 \end{bmatrix}

Problem 3. A transformation collapses the plane onto the line $y = -x$. The image of $e_1$ is $[1, -1]^T$ and the image of $e_2$ is $[-2, 2]^T$. Find the matrix $A$ and verify its determinant.
Reveal solution
  1. The first column is $T(e_1) = [1, -1]^T$.
  2. The second column is $T(e_2) = [-2, 2]^T$.
  3. The matrix is $A = \begin{bmatrix} 1 & -2 \\ -1 & 2 \end{bmatrix}$.
  4. The determinant is $(1)(2) - (-2)(-1) = 2 - 2 = 0$.

Answer: \begin{bmatrix} 1 & -2 \\ -1 & 2 \end{bmatrix}

L82. Module 5 review + self-test

Module 5  2026-10-25  ·  10:39  ·  practice PDF

Practice problems (3)
Problem 1. Find the standard matrix $A$ for a transformation $T: \mathbb{R}^2 \to \mathbb{R}^2$ that reflects a vector across the line $y=x$ and then scales the result by a factor of $2$.
Reveal solution
  1. The reflection across $y=x$ maps $e_1 = [1, 0]^T$ to $[0, 1]^T$ and $e_2 = [0, 1]^T$ to $[1, 0]^T$.
  2. Applying the scaling factor of $2$ to these results gives $T(e_1) = [0, 2]^T$ and $T(e_2) = [2, 0]^T$.
  3. The standard matrix $A$ is formed by these images as columns.

Answer: A = \begin{bmatrix} 0 & 2 \\ 2 & 0 \end{bmatrix}

Problem 2. Given the matrix $A = \begin{bmatrix} 1 & 3 \\ 1 & 3 \end{bmatrix}$, find the dimension of the kernel and the dimension of the image.
Reveal solution
  1. The columns are identical, so the image is the span of $[1, 1]^T$, which has dimension $1$.
  2. Using the Rank-Nullity Theorem, $\dim(\ker(A)) + \dim(\text{im}(A)) = 2$.
  3. Therefore, $\dim(\ker(A)) = 2 - 1 = 1$.

Answer: \dim(\ker(A)) = 1, \dim(\text{im}(A)) = 1

Problem 3. Determine if the matrices $A = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}$ and $B = \begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix}$ are similar by checking their invariants.
Reveal solution
  1. Compute the determinant of $A$: $\det(A) = 1 \times 2 - 0 \times 0 = 2$.
  2. Compute the determinant of $B$: $\det(B) = 1 \times 2 - 1 \times 0 = 2$.
  3. Compute the trace of $A$: $\text{tr}(A) = 1 + 2 = 3$.
  4. Compute the trace of $B$: $\text{tr}(B) = 1 + 2 = 3$.
  5. Since both the determinant and trace match, the matrices are candidates for similarity, although matching invariants are necessary but not sufficient to prove similarity.

Answer: The invariants match, so they may be similar.

Module 6 — Orthogonality & Least Squares (6/14)

L83. Orthogonal vectors and orthogonal subspaces

Module 6  2026-10-26  ·  11:41  ·  practice PDF

Practice problems (3)
Problem 1. Determine if the subspaces $V = \text{span}\{\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}\}$ and $W = \text{span}\{\begin{bmatrix} 1 \\ 0 \\ -1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ -2 \end{bmatrix}\}$ are orthogonal.
Reveal solution
  1. Identify the basis for $V$ as $v_1 = [1, 2, 1]^T$.
  2. Identify the basis for $W$ as $w_1 = [1, 0, -1]^T$ and $w_2 = [0, 1, -2]^T$.
  3. Compute $v_1 \cdot w_1 = (1)(1) + (2)(0) + (1)(-1) = 1 + 0 - 1 = 0$.
  4. Compute $v_1 \cdot w_2 = (1)(0) + (2)(1) + (1)(-2) = 0 + 2 - 2 = 0$.
  5. Since all pairs of basis vectors are orthogonal, the subspaces are orthogonal.

Answer: Yes, they are orthogonal.

Problem 2. In $\mathbb{R}^4$, can two subspaces $V$ and $W$ both have dimension 3 and be orthogonal to each other?
Reveal solution
  1. Recall the dimension constraint for orthogonal subspaces: $\dim(V) + \dim(W) \le n$.
  2. Here, $n = 4$.
  3. The sum of dimensions is $3 + 3 = 6$.
  4. Since $6 > 4$, the condition is violated.

Answer: No, because the sum of their dimensions would exceed the dimension of the space.

Problem 3. Given the matrix $A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$, find a basis for the row space and a basis for the null space, and verify they are orthogonal.
Reveal solution
  1. The row space is spanned by $[1, 2]^T$ since the second row is a multiple of the first.
  2. To find the null space, solve $x + 2y = 0$, which gives $x = -2y$. A basis vector is $[-2, 1]^T$.
  3. Compute the dot product: $(1)(-2) + (2)(1) = -2 + 2 = 0$.
  4. The basis vectors are orthogonal, so the subspaces are orthogonal.

Answer: Row space basis: $\{\begin{bmatrix} 1 \\ 2 \end{bmatrix}\}$, Null space basis: $\{\begin{bmatrix} -2 \\ 1 \end{bmatrix}\}$. Dot product is 0.

L84. The orthogonal complement; orthogonality of the four subspaces

Module 6  2026-10-27  ·  10:05  ·  practice PDF

Practice problems (3)
Problem 1. Find a basis for the orthogonal complement $V^{\perp}$ of the subspace $V$ in $\mathbb{R}^3$ spanned by the vectors $\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}$ and $\begin{bmatrix} 0 \\ 1 \\ -1 \end{bmatrix}$.
Reveal solution
  1. A vector $\begin{bmatrix} x \\ y \\ z \end{bmatrix}$ is in $V^{\perp}$ if its dot product with both spanning vectors is zero.
  2. This gives the system: $x + 2y + z = 0$ and $y - z = 0$.
  3. From the second equation, $y = z$.
  4. Substitute into the first: $x + 2z + z = 0$, so $x + 3z = 0$, which means $x = -3z$.
  5. The vectors are of the form $\begin{bmatrix} -3z \\ z \\ z \end{bmatrix} = z\begin{bmatrix} -3 \\ 1 \\ 1 \end{bmatrix}$.

Answer: \text{span}\{\begin{bmatrix} -3 \\ 1 \\ 1 \end{bmatrix}\}

Problem 2. Given a $3 \times 5$ matrix $A$ with rank 2, what is the dimension of the orthogonal complement of the row space of $A$?
Reveal solution
  1. The row space of $A$ is a subspace of $\mathbb{R}^5$ because the rows have 5 components.
  2. The dimension of the row space is equal to the rank of the matrix, which is 2.
  3. The dimension of the orthogonal complement $V^{\perp}$ is $n - \dim(V)$.
  4. Here $n = 5$ and $\dim(Row(A)) = 2$.
  5. Therefore, $\dim(Row(A)^{\perp}) = 5 - 2 = 3$.

Answer: 3

Problem 3. Let $V$ be the subspace of $\mathbb{R}^4$ defined by the equation $x_1 + x_2 + x_3 + x_4 = 0$. Find a basis for $V^{\perp}$.
Reveal solution
  1. The subspace $V$ is defined as the set of all vectors $\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix}$ such that $\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = 0$.
  2. This means $V$ is the null space of the matrix $A = \begin{bmatrix} 1 & 1 & 1 & 1 \end{bmatrix}$.
  3. We know that $Null(A)^{\perp} = Row(A)$.
  4. The row space of $A$ is spanned by the single row vector $\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}$.
  5. Thus, $V^{\perp}$ is spanned by the vector $\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}$.

Answer: \text{span}\{\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}\}

L85. Projection onto a line

Module 6  2026-10-28  ·  9:54  ·  practice PDF

Practice problems (3)
Problem 1. Find the projection of $b = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$ onto $a = \begin{bmatrix} 3 \\ 4 \end{bmatrix}$.
Reveal solution
  1. Compute $a \cdot b = (3)(5) + (4)(2) = 15 + 8 = 23$.
  2. Compute $a \cdot a = 3^2 + 4^2 = 9 + 16 = 25$.
  3. Calculate the scalar $c = 23/25 = 0.92$.
  4. Multiply $c$ by $a$: $0.92 \begin{bmatrix} 3 \\ 4 \end{bmatrix} = \begin{bmatrix} 2.76 \\ 3.68 \end{bmatrix}$.

Answer: \begin{bmatrix} 2.76 \\ 3.68 \end{bmatrix}

Problem 2. Project the vector $b = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}$ onto the vector $a = \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}$.
Reveal solution
  1. Compute $a \cdot b = (0)(1) + (1)(1) + (1)(0) = 1$.
  2. Compute $a \cdot a = 0^2 + 1^2 + 1^2 = 2$.
  3. The scalar is $c = 1/2$.
  4. The projection is $p = \frac{1}{2} \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ 0.5 \\ 0.5 \end{bmatrix}$.

Answer: \begin{bmatrix} 0 \\ 0.5 \\ 0.5 \end{bmatrix}

Problem 3. Given $a = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $b = \begin{bmatrix} -1 \\ 1 \end{bmatrix}$, find the projection $p$ and the error vector $e$. Verify that $p \cdot e = 0$.
Reveal solution
  1. Compute $a \cdot b = (1)(-1) + (2)(1) = 1$.
  2. Compute $a \cdot a = 1^2 + 2^2 = 5$.
  3. Find $p = \frac{1}{5} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 0.2 \\ 0.4 \end{bmatrix}$.
  4. Find $e = b - p = \begin{bmatrix} -1 - 0.2 \\ 1 - 0.4 \end{bmatrix} = \begin{bmatrix} -1.2 \\ 0.6 \end{bmatrix}$.
  5. Check $p \cdot e = (0.2)(-1.2) + (0.4)(0.6) = -0.24 + 0.24 = 0$.

Answer: p = \begin{bmatrix} 0.2 \\ 0.4 \end{bmatrix}, e = \begin{bmatrix} -1.2 \\ 0.6 \end{bmatrix}

L86. Projection onto a subspace — the projection matrix

Module 6  2026-10-29  ·  11:10  ·  practice PDF

Practice problems (3)
Problem 1. Find the projection matrix $P$ for the subspace spanned by the vector $a = [1, 1]^T$.
Reveal solution
  1. Set $A = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
  2. Compute $A^T A = [1 \ 1] \begin{bmatrix} 1 \\ 1 \end{bmatrix} = [2]$.
  3. The inverse is $(A^T A)^{-1} = [1/2]$.
  4. Compute $P = A (A^T A)^{-1} A^T = \begin{bmatrix} 1 \\ 1 \end{bmatrix} [1/2] [1 \ 1] = \begin{bmatrix} 0.5 & 0.5 \\ 0.5 & 0.5 \end{bmatrix}$.

Answer: P = \begin{bmatrix} 0.5 & 0.5 \\ 0.5 & 0.5 \end{bmatrix}

Problem 2. Given the projection matrix $P = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$, project the vector $b = [3, 7]^T$ onto the subspace.
Reveal solution
  1. The projection is $p = P b$.
  2. Compute $\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 3 \\ 7 \end{bmatrix} = \begin{bmatrix} 1(3) + 0(7) \\ 0(3) + 0(7) \end{bmatrix} = \begin{bmatrix} 3 \\ 0 \end{bmatrix}$.

Answer: p = [3, 0]^T

Problem 3. Verify if the matrix $M = \begin{bmatrix} 0.6 & 0.8 \\ 0.8 & 0.6 \end{bmatrix}$ is a projection matrix.
Reveal solution
  1. A projection matrix must satisfy $M^2 = M$.
  2. Compute $M^2 = \begin{bmatrix} 0.6 & 0.8 \\ 0.8 & 0.6 \end{bmatrix} \begin{bmatrix} 0.6 & 0.8 \\ 0.8 & 0.6 \end{bmatrix}$.
  3. Top left: $0.6(0.6) + 0.8(0.8) = 0.36 + 0.64 = 1.0$.
  4. Since the top left entry of $M^2$ is $1.0$ and the top left entry of $M$ is $0.6$, $M^2 \neq M$.

Answer: No, it is not a projection matrix.

L87. Least squares I — the closest solution to an unsolvable system

Module 6  2026-10-30  ·  12:01  ·  practice PDF

Practice problems (3)
Problem 1. Find the least squares solution $\hat{x}$ for the system $Ax = b$ where $A = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ and $b = \begin{bmatrix} 1 \\ 4 \end{bmatrix}$.
Reveal solution
  1. Compute $A^T A = [1 \quad 2] \begin{bmatrix} 1 \\ 2 \end{bmatrix} = [1^2 + 2^2] = [5]$.
  2. Compute $A^T b = [1 \quad 2] \begin{bmatrix} 1 \\ 4 \end{bmatrix} = [1(1) + 2(4)] = [9]$.
  3. Solve the normal equation $5\hat{x} = 9$.
  4. Divide by 5 to get $\hat{x} = 1.8$.

Answer: \hat{x} = 1.8

Problem 2. Given $A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{bmatrix}$ and $b = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}$, find the least squares solution $\hat{x}$.
Reveal solution
  1. Compute $A^T A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}$.
  2. Compute $A^T b = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
  3. Solve $\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} \hat{x}_1 \\ \hat{x}_2 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$.
  4. Subtracting the equations or using the inverse gives $\hat{x}_1 = 1/3$ and $\hat{x}_2 = 1/3$.

Answer: \hat{x} = \begin{bmatrix} 1/3 \\ 1/3 \end{bmatrix}

Problem 3. Explain why the normal equations $A^T A \hat{x} = A^T b$ are always consistent, even if $Ax = b$ is not.
Reveal solution
  1. The system $Ax = b$ is inconsistent if $b$ is not in the column space of $A$.
  2. The normal equations seek a vector $p = A\hat{x}$ such that $p$ is the projection of $b$ onto $Col(A)$.
  3. The projection $p$ always exists for any vector $b$ and any subspace $Col(A)$.
  4. Since $p$ is by definition in $Col(A)$, there must exist some $\hat{x}$ such that $A\hat{x} = p$.
  5. This $\hat{x}$ satisfies $A^T(b - A\hat{x}) = 0$, which is the normal equation.

Answer: Because the projection of $b$ onto the column space of $A$ always exists and is always reachable by a linear combination of the columns of $A$.

L88. Least squares II — fitting a line to data (regression!)

Module 6  2026-10-31  ·  10:03  ·  practice PDF

Practice problems (3)
Problem 1. Find the least squares line $y = mx + c$ for the points $(1, 2), (2, 3), (3, 5)$.
Reveal solution
  1. Construct $A = \begin{pmatrix} 1 & 1 \\ 2 & 1 \\ 3 & 1 \end{pmatrix}$ and $b = \begin{pmatrix} 2 \\ 3 \\ 5 \end{pmatrix}$.
  2. Compute $A^T A = \begin{pmatrix} 1+4+9 & 1+2+3 \\ 1+2+3 & 1+1+1 \end{pmatrix} = \begin{pmatrix} 14 & 6 \\ 6 & 3 \end{pmatrix}$.
  3. Compute $A^T b = \begin{pmatrix} 1(2)+2(3)+3(5) \\ 2+3+5 \end{pmatrix} = \begin{pmatrix} 23 \\ 10 \end{pmatrix}$.
  4. Solve $\begin{pmatrix} 14 & 6 \\ 6 & 3 \end{pmatrix} \begin{pmatrix} m \\ c \end{pmatrix} = \begin{pmatrix} 23 \\ 10 \end{pmatrix}$.
  5. From the second equation, $3c = 10 - 6m$, so $c = 10/3 - 2m$.
  6. Substitute into first: $14m + 6(10/3 - 2m) = 23 \implies 14m + 20 - 12m = 23 \implies 2m = 3 \implies m = 1.5$.
  7. Then $c = 10/3 - 3 = 1/3$.

Answer: y = 1.5x + 1/3

Problem 2. Given the points $(0, 1), (1, 1), (2, 1)$, what is the least squares line?
Reveal solution
  1. The points are horizontal. The line $y = 1$ should be the best fit.
  2. Construct $A = \begin{pmatrix} 0 & 1 \\ 1 & 1 \\ 2 & 1 \end{pmatrix}$ and $b = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}$.
  3. Compute $A^T A = \begin{pmatrix} 5 & 3 \\ 3 & 3 \end{pmatrix}$.
  4. Compute $A^T b = \begin{pmatrix} 0+1+2 \\ 1+1+1 \end{pmatrix} = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$.
  5. Solve $\begin{pmatrix} 5 & 3 \\ 3 & 3 \end{pmatrix} \begin{pmatrix} m \\ c \end{pmatrix} = \begin{pmatrix} 3 \\ 3 \end{pmatrix}$.
  6. Subtracting equations gives $2m = 0 \implies m = 0$.
  7. Then $3(0) + 3c = 3 \implies c = 1$.

Answer: y = 1

Problem 3. If we have $n$ points and we force the line to pass through the origin ($c=0$), how does the matrix $A$ change?
Reveal solution
  1. The equation becomes $y = mx$.
  2. The system is now $m x_i = y_i$ for each $i$.
  3. The matrix $A$ no longer needs the column of ones.
  4. A becomes a single column vector containing the x values: $A = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix}$.

Answer: A becomes a single column vector of x-coordinates.

L89. Least squares III — polynomial fitting; connection to statistics tomorrow 07:30
L90. Orthonormal bases and why they're wonderful
L91. Gram-Schmidt I — the process
L92. Gram-Schmidt II — worked examples and pitfalls
L93. QR decomposition
L94. Orthogonal matrices: rotations, reflections, and preserved lengths
L95. Application: Fourier ideas — decomposing into orthogonal pieces
L96. Module 6 review + self-test
Module 7 — Eigenvalues & Eigenvectors (0/14)
L97. Eigenvectors: the directions a matrix doesn't turn
L98. Computing eigenvalues: the characteristic polynomial
L99. Computing eigenvectors; eigenspaces
L100. Eigenvalue clinic — 2x2 and 3x3 practice
L101. Complex eigenvalues and rotations
L102. Diagonalisation I — when and how
L103. Diagonalisation II — matrix powers made easy
L104. Application: Fibonacci in closed form
L105. Application: Markov chains and steady states
L106. Application: Google PageRank — the trillion-dollar eigenvector
L107. Application: systems of differential equations
L108. Trace, determinant, and eigenvalue relationships
L109. Defective matrices; a glimpse of Jordan form
L110. Module 7 review + self-test
Module 8 — Symmetric Matrices, SVD & Beyond (0/10)
L111. Symmetric matrices: real eigenvalues, orthogonal eigenvectors
L112. The Spectral Theorem — the crown jewel
L113. Quadratic forms and positive definiteness
L114. The Singular Value Decomposition I
L115. The SVD II — computing it; the four subspaces revealed
L116. SVD applications: image compression
L117. Principal Component Analysis — finding the axes of data
L118. The pseudoinverse; least squares revisited via SVD
L119. Where linear algebra goes next
L120. Grand review — the whole course in 15 minutes