Homepage › Solution manuals › Gilbert Strang › Linear Algebra and Learning from Data › Exercise 4.9.1
Exercise 4.9.1
Answers
We form the square matrix , we need find the SVD for this matrix.
let , then we have , the eigenvalues are , with eigenvectors: , and , these are the right singular vectors as well, The corresponding left singular vectors are and , in the end we have
.
The orthogonal matrix that minimizes the norm is , the minimal nor is: 4.
If we let , then we have
This is minimized when , where
So , the minimal norm is 8. It misses the optimal computed above, which is caused by the assumption that the off diagonal entries are opposite of each other.
import numpy as np u = np.array([[1, -1], [1, 1]]) v = np.array([[1, 1], [1, -1]]) m = np.array([[3, 0], [0, 1]]) np.matmul(np.matmul(u, m), v.transpose()) np.matmul(v.transpose(), u)
array([[ 2, 0], [ 0, -2]])