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. Question 1 of 12.

    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

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  2. Question 2 of 12.

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

    det

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  3. Question 3 of 12.

    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})?

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  4. Question 4 of 12.

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

  5. Question 5 of 12.

    Find the inverse of [4322]\begin{bmatrix} 4 & 3 \\ 2 & 2 \end{bmatrix}. Enter the four entries row by row, as decimals or fractions.

    inverse

    One entry per box, row by row (Tab moves along a row). 0.25, -2, 3/4 and sqrt(2) all work. Enter moves to the next empty box.

  6. Question 6 of 12.

    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. Question 7 of 12.

    Solve [1235]x=[411]\begin{bmatrix} 1 & 2 \\ 3 & 5 \end{bmatrix}\mathbf{x} = \begin{bmatrix} 4 \\ 11 \end{bmatrix}. Enter x\mathbf{x} as a column, x1x_1 on top.

    x

    One entry per box, top to bottom. 0.25, -2, 3/4 and sqrt(2) all work. Enter moves to the next empty box.

  8. Question 8 of 12.

    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. Question 9 of 12.

    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

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  10. Question 10 of 12.

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

    trainable numbers

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  11. Question 11 of 12.

    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. Question 12 of 12.

    Run the tests before you submit. This question counts as correct if your latest run passes every check.

    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).

    ⌘+Enter runsPython sleeps until you run code
    Write your code where the starter says raise NotImplementedError, then press Run tests. Each check says what it expects.
0 of 12 answered. Unanswered questions count as wrong.