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 43 of 120 · Module 2: Matrix Algebra

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 (0/10)
L44. The determinant as area/volume scaling factor tomorrow 07:30
L45. 2x2 and 3x3 determinants; orientation and sign
L46. Properties of determinants (from the geometric view)
L47. Cofactor expansion
L48. Determinants via row reduction — the practical method
L49. det(AB) = det(A)det(B) and consequences
L50. Cramer's rule (and why you rarely use it)
L51. The determinant test for invertibility — tying it together
L52. Determinant clinic — mixed practice
L53. Module 3 review + self-test
Module 4 — Vector Spaces (0/17)
L54. What is a vector space? Abstracting the rules
L55. Subspaces: definition and recognition
L56. The null space of a matrix
L57. The column space of a matrix
L58. Linear independence I — concept and geometric meaning
L59. Linear independence II — testing with elimination
L60. Basis: minimal spanning sets
L61. Dimension — and why it's well-defined
L62. Finding bases for null space and column space
L63. The row space; rank of a matrix
L64. The Rank-Nullity theorem — the great accounting identity
L65. The four fundamental subspaces (the big picture)
L66. Coordinates relative to a basis
L67. Change of basis I — the idea and the matrix
L68. Change of basis II — worked examples
L69. Function spaces and other exotic vector spaces
L70. Module 4 review + self-test
Module 5 — Linear Transformations (0/12)
L71. Linear transformations: functions that respect the grid
L72. Every linear map is a matrix (and how to find it)
L73. Rotations, reflections, shears, scalings — the 2D gallery
L74. Composition of transformations = matrix multiplication (revisited)
L75. Kernel and image; injectivity and surjectivity
L76. Invertible transformations — undoing a map
L77. Linear maps in 3D; projections onto planes
L78. The matrix of a transformation in a different basis — similarity
L79. Why similar matrices represent the same map
L80. Transformations of function spaces: the derivative as a matrix
L81. Transformation clinic — identify the matrix from the picture
L82. Module 5 review + self-test
Module 6 — Orthogonality & Least Squares (0/14)
L83. Orthogonal vectors and orthogonal subspaces
L84. The orthogonal complement; orthogonality of the four subspaces
L85. Projection onto a line
L86. Projection onto a subspace — the projection matrix
L87. Least squares I — the closest solution to an unsolvable system
L88. Least squares II — fitting a line to data (regression!)
L89. Least squares III — polynomial fitting; connection to statistics
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