Due Friday night March 6th¶
  1. Let A be an arbitrary square n x n matrix.

Are the singular values of $A^2$ necessarily the same as the squares of the singular values of A? (either find a counterexample by hand or with julia, or prove that it is always the case, or demonstrate with enough examples to be convicing with julia)

  1. Let A be an arbitrary m x n matrix.

Are the singular values of $A^TA$ necessarily the same as the squares of the singular values of A? (either find a counterexample by hand or with julia, or prove that it is always the case, or demonstrate with enough examples to be convicing with julia)

  1. Suppose we have the rank-r svd of a rank 1 matrix $A = U\Sigma V^T$. Describe the nullspace of $A$ in terms of possibly U, $\Sigma$, and V.
  1. Let A be the matrix below with the full SVD (Note: numbers with an e-16 or e-15 may be considered to be 0)
In [3]:
A = [ 1 4 2;2 8 4; -1 -4 -2]
Out[3]:
3×3 Array{Int64,2}:
  1   4   2
  2   8   4
 -1  -4  -2
In [4]:
using LinearAlgebra
U,s,V =svd(A, full=true)
display(U)
display(s)
display(V)
3×3 Array{Float64,2}:
 -0.408248   0.912871  7.81735e-17
 -0.816497  -0.365148  0.447214   
  0.408248   0.182574  0.894427   
3-element Array{Float64,1}:
 11.22497216032183     
  4.845410522502476e-16
  0.0                  
3×3 Adjoint{Float64,Array{Float64,2}}:
 -0.218218  -0.9759    0.0     
 -0.872872   0.19518  -0.447214
 -0.436436   0.09759   0.894427

4a. What is the rank of this matrix?
4b. For which right hand sides is Ax=b solvable? (Find a condition on b₁,b₂,b₃)?

  1. Let A be the matrix below with the full SVD
In [6]:
A = [1 4; 2 9;-1 -4]
Out[6]:
3×2 Array{Int64,2}:
  1   4
  2   9
 -1  -4
In [7]:
using LinearAlgebra
U,s,V =svd(A, full=true)
display(U)
display(s)
display(V)
3×3 Array{Float64,2}:
 -0.377924   0.59764    0.707107   
 -0.84519   -0.534466  -1.38778e-15
  0.377924  -0.59764    0.707107   
2-element Array{Float64,1}:
 10.907941643728067  
  0.12964990174715935
2×2 Adjoint{Float64,Array{Float64,2}}:
 -0.224261   0.974529
 -0.974529  -0.224261

5a. What is the rank of this matrix?
5b. For which right hand sides is Ax=b solvable? (Find a condition on b₁,b₂,b₃)?

(6) Explain why the set of singular matrices is not a subspace.

(7) If the 9x12 system Ax=b is solvable for every b then the column space of A is .......?

(8) GS p143 3.2 15 done with the svd on a computer:

Construct a matrix for which N(A) = all combinations of (2,2,1,0) and (3,1,0,1)

Step 1: Find an orthogonal matrix whose first two columns are linear combinations of the given vectors:
Notice that we input a 4x2 matrix but Julia's QR returns a complete square orthgonal matrix whose first two columns are the Q we saw in class.

In [24]:
using LinearAlgebra
N = [2 3
     2 1
     1 0
     0 1];
Q, = qr(N) # we don't need R just the "Q"
W = Q[:,[3,4]] # take the last two columns of Q ( " [3,4] " means take column 3 and 4, note that the commas are needed)
Out[24]:
4×2 Array{Float64,2}:
  0.11684   -0.397212 
 -0.527969   0.348208 
  0.822258   0.0980073
  0.17745    0.843427 

Step 2: W' immediately gives a right answer. Let's check this.

In [20]:
W'N
Out[20]:
2×2 Array{Float64,2}:
 -1.11022e-16  -1.66533e-16
 -8.32667e-17   3.33067e-16

Understanding that the last two columns of Q are the completion of the left part to an orthogonal matrix explain why this worked.

(9) (Julia submit a screenshot problem) GS p143 3.2 16:
With Julia construct A so that the nullspace of A = all multiples of (4,3,2,1). Its rank is ..... ?

In [25]:
using LinearAlgebra
N = [4
     3
     2
     1]
# Please finish the computation following problem 8 as a template
Out[25]:
4-element Array{Int64,1}:
 4
 3
 2
 1
In [26]:
# please provide a screenshot of your check

(10) Use the svd to explain why no 3x3 matrix have a nullspace that equals its column space.

In [ ]: