ml.lab
Python sleeps until you run code
03 Determinants, inverses and rank

Checkpoint

Determinants, inverses and rank

Twelve questions on determinants, inverses, rank and conditioning, with new numbers and a few classic traps. Work on paper where it helps. Pass at 80% before moving on to eigenvectors, which lean on every idea here.

  1. 1

    A 2x2 matrix has determinant −3-3. A triangle of area 4 goes in. What is the area of the triangle that comes out?

    area
  2. 2

    Compute det⁡[210034105]\det\begin{bmatrix} 2 & 1 & 0 \\ 0 & 3 & 4 \\ 1 & 0 & 5 \end{bmatrix}.

    det
  3. 3

    A 3×33 \times 3 matrix A\mathbf{A} has det⁡A=2\det\mathbf{A} = 2. What is det⁡(3A)\det(3\mathbf{A})?

  4. 4

    A\mathbf{A} is a 3×33 \times 3 matrix with det⁡A=0\det\mathbf{A} = 0. Which statement must be true?

  5. 5

    Find the inverse of [4322]\begin{bmatrix} 4 & 3 \\ 2 & 2 \end{bmatrix}.

    inverse
  6. 6

    You apply B\mathbf{B} to a vector x\mathbf{x} and then A\mathbf{A}, which gives ABx\mathbf{A}\mathbf{B}\mathbf{x}. Both matrices are invertible. Which matrix takes ABx\mathbf{A}\mathbf{B}\mathbf{x} back to x\mathbf{x}?

  7. 7

    Solve [1235]x=[411]\begin{bmatrix} 1 & 2 \\ 3 & 5 \end{bmatrix}\mathbf{x} = \begin{bmatrix} 4 \\ 11 \end{bmatrix}.

    x
  8. 8

    A 3×33 \times 3 matrix sends all of 3D space onto a plane through the origin. What are its rank and the dimension of its null space?

  9. 9

    B\mathbf{B} is 1000×41000 \times 4 and A\mathbf{A} is 4×10004 \times 1000. What is the largest possible rank of the 1000×10001000 \times 1000 matrix BA\mathbf{B}\mathbf{A}?

    rank
  10. 10

    A 2048×51202048 \times 5120 weight matrix gets a LoRA update of rank 8. How many trainable numbers does the update have?

    trainable numbers
  11. 11

    You must solve Ax=b\mathbf{A}\mathbf{x} = \mathbf{b} where b\mathbf{b} comes from slightly noisy measurements. Which matrix is the most dangerous to have as A\mathbf{A}?

  12. 12
    Code it

    Use the determinant's sign as a geometry tool. Write signed_area(p, q, r) for the triangle with corners p, q and r (each a pair of numbers): half the determinant of the 2x2 matrix whose columns are q−p\mathbf{q} - \mathbf{p} and r−p\mathbf{r} - \mathbf{p}, positive when the corners go counterclockwise. Then write orientation(p, q, r), which returns 1 for a counterclockwise turn, -1 for a clockwise turn and 0 for three points on one line (treat a signed area with absolute value at most tol as zero).

    ⌘↵ runsPython sleeps until you run code
12 still unanswered. Unanswered questions count as wrong.