Let two vectors a=(1,2,3)T and b=(−8,1,2)T.Answer the following equations: (1) Compute the ℓ2 norm of a and b (2) Calculate the Euclidean distance between a and b (3) Are a and b orthogonal? Solution:
(1)The ℓ2 norm of a is 14 and the ℓ2 norm of b is 69.
(2)The Euclidean distance between a and b is 83.
(3)As aTb=1×(−8)+2×1+3×2=0, a and b is orthogonal.
Problem 2
Suppose A=⎣⎡136−3−5−6334⎦⎤, answer the following questions: (1) Calculate A−1 and det(A). (2) The Rank of A is? (3) The trace of A is? (4) Calculate A+AT (5) Is A an orthogonal matrix? State your reason. (6) Calculate all the eigenvalue λ and corresponding eigenvectors of A. (7) Diagonalize the matrix A. (8) Calculate the ℓ2,1 norm ∥A∥2,1 and the Frobenius norm (i.e. ℓ2 norm) ∥A∥F (9) Calculate the nuclear norm ∥A∥∗ and the spectral norm ∥A∥2
(5)ATA=⎣⎡46−5436−5470−4836−4834⎦⎤=I, so A is not an orthogonal matrix.
(6)The characteristic determinant of A is ∣∣∣∣∣∣λ−1−3−63λ+56−3−3λ−4∣∣∣∣∣∣=(λ+2)2(λ−4). Thus, all the eigenvalues of A are λ1=λ2=−2,λ3=4. Let Aαi=λiαi,i=1,2,3. Then we have α1=⎣⎡110⎦⎤,α2=⎣⎡011⎦⎤,α3=⎣⎡112⎦⎤. αi(i=1,2,3) are the corresponding eigenvectors.
(7)The diagonal matrix corresponding to matrix A is ⎣⎡−2000−20004⎦⎤
(8)In order to calculate the ℓ2,1 norm ∥A∥2,1, we first calculate the 2-norm of each row:19,43,222. Thus, ∥A∥2,1=19+43+222. ∥A∥F=(i=1∑mj=1∑n(aij)2)21=1+9+9+9+25+9+36+36+16=150.
(9)The nuclear norm ∥A∥∗ is defined as the sum of all the singular values of matrix A. As is calculated above, ATA=⎣⎡46−5436−5470−4836−4834⎦⎤. Supposing the eigenvalues of ATA are λi,i=1,2,3, we have ∣λI−A∣=0. That is, ∣∣∣∣∣∣λ−4654−3654λ−7048−3648λ−34∣∣∣∣∣∣=0 Hence, we have λ3−150λ2+648λ−256=0 The solution of the equation is: λ1=4λ2=73+965λ3=73−965 Thus, ∥A∥∗=2+73+965+73−965≈14.727922061357859. ∥A∥2=max(ATA)=73+965≈12.064838156174618
Problem 3
Please give some proper steps to show how you get the answer. Let x=(x1,x2,x3)T and ⎩⎨⎧2x1+2x2+3x3=1x1−x2=−1−x1+2x2+x3=2 Answer the following questions: (1) Solve the linear equations (2) Write it into matrix form(i.e. Ax=b ) and we will use the same A and b in the following questions. (3) The Rank of A is? (4) Calculate A−1 and det(A) (5) Use (4) to solve the linear equations (6) Calculate the inner product and outer product of x and b.(i.e. ⟨x,b⟩ and x⊗b ) (7) Calculate the ℓ1,ℓ2 and ℓ∞ norm of b (8) Suppose y=(y1,y2,y3), calculate yTAy,∇yyTAy (9) We add one linear equation −x1+2x2+x3=2 into linear equations above. Write it into matrix form(i.e. A1x=b) (10) The rank of A1 is? (11) Could these linear equations A1x=b be solved? State reasons. Solution: (1)Solving the linear equations, we have: x1=−1,x2=0,x3=1.
(2)The linear equation can be written into matrix form Ax=b where A=⎣⎡21−12−12301⎦⎤ and b=⎣⎡1−12⎦⎤
(3)The rank of A is 3.
(4)A−1=⎣⎡11−1−4−56−3−34⎦⎤ det(A)=−1.
(5)x=A−1b=⎣⎡11−1−4−56−3−34⎦⎤⎣⎡1−12⎦⎤=⎣⎡−101⎦⎤ That is, x1=−1,x2=0,x3=1, which is consistent with the result of question1.
(6)<x,b>=1,x⨂b=[131]T
(7)The ℓ1 norm of b is ∥b∥1=1+1+2=5. The ℓ2 norm of b is ∥b∥2=1+1+4=6. The ℓ∞ norm of b is ∥b∥∞=max(1,1,2)=2.
(9)The new linear equation can be written into matrix form A1x=b1 where A1=⎣⎢⎢⎡21−1−12−1223011⎦⎥⎥⎤ and b1=⎣⎢⎢⎡1−122⎦⎥⎥⎤
(10)The rank of A1 is 3.
(11)Yes. The number of variables is the same as the rank of the new matrix A1 and thus there is no more than one solution to the non homogeneous linear equations. Moreover, after diagonalizing the matrix A, we can see that after deleting the row whose elements are all zero, determinant of the new matrix is not zero. This indicates that a solution exists for these linear equations.