ml.lab
Python sleeps until you run code
04 Eigenvectors and eigenvalues

Checkpoint

Eigenvectors and eigenvalues

Twelve questions across the module: finding eigenvectors, what repeated multiplication does, symmetric matrices and singular values. The numbers are new. Work on paper where it helps; the last item is a short piece of code. You pass at 80 percent.

  1. Question 1 of 12.

    Which of these are eigenvectors of [320−1]\begin{bmatrix} 3 & 2 \\ 0 & -1 \end{bmatrix}? Select every one.

    Choose every option that applies.

  2. Question 2 of 12.

    The matrix [7−241]\begin{bmatrix} 7 & -2 \\ 4 & 1 \end{bmatrix} has two real eigenvalues. Find the eigenvector for the smaller one, scaled so its first entry is 1, and enter it as a column.

    v

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

  3. Question 3 of 12.

    You learn that λ=0\lambda = 0 is an eigenvalue of a square matrix A\mathbf{A}. What does that tell you?

  4. Question 4 of 12.

    A 3×33 \times 3 matrix has trace 4. Two of its eigenvalues are 2 and −1-1. What is its determinant?

    det

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

  5. Question 5 of 12.

    A matrix A\mathbf{A} has eigenvector (1,1)(1,\allowbreak 1) with eigenvalue 1 and eigenvector (1,−1)(1,\allowbreak -1) with eigenvalue 12\tfrac{1}{2}. Compute A3(3,1)\mathbf{A}^3(3,\allowbreak 1) and enter it as a column, in decimals.

    A^3 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.

  6. Question 6 of 12.

    What is the spectral radius of [0.3−0.40.40.3]\begin{bmatrix} 0.3 & -0.4 \\ 0.4 & 0.3 \end{bmatrix}?

    rho

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

  7. Question 7 of 12.

    A 2×22 \times 2 matrix W\mathbf{W} has eigenvalues 0.50.5 and −1.2-1.2. You multiply a random vector by W\mathbf{W} 60 times. What happens?

  8. Question 8 of 12.

    What is the largest singular value of [3400]\begin{bmatrix} 3 & 4 \\ 0 & 0 \end{bmatrix}? Its eigenvalues are 3 and 0.

    sigma 1

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

  9. Question 9 of 12.

    A symmetric 2×22 \times 2 matrix has eigenvalues −4-4 and 2. What are its singular values?

  10. Question 10 of 12.

    Centered 2D data has covariance matrix [2225]\begin{bmatrix} 2 & 2 \\ 2 & 5 \end{bmatrix}. What is the first principal component, and what fraction of the variance does it capture?

  11. Question 11 of 12.

    You approximate a 512×2048512 \times 2048 weight matrix by its rank-8 truncated SVD, stored as the 8 columns σiui\sigma_i\mathbf{u}_i and the 8 rows vi⊤\mathbf{v}_i^\top. How many numbers do you store?

    numbers

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

  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

    Write gain(A): the largest factor by which the matrix A (any shape) can stretch a vector. Compute it as the square root of the largest eigenvalue of A⊤A\mathbf{A}^\top\mathbf{A}, using np.linalg.eigvalsh. Do not use np.linalg.svd or np.linalg.norm(A, 2).

    ⌘+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.