In: Advanced Math
for the matrix, A= [1 2 -1; 2 3 1; -1 -1 -2; 3 5 0]
a. calculate the transpose of A multiplied by A
b. find the eigenvectors and eigenvalues of the answer to a
c. Find the SVD of matrix A
MATLAB Code:
close all
clear
clc
A = [1 2 -1; 2 3 1; -1 -1 -2; 3 5 0];
fprintf('Part (a)\n--------------------------------\n')
B = A' * A;
disp('Transpose(A) * A ='), disp(B)
fprintf('\nPart (b)\n--------------------------------\n')
[V, D] = eig(B);
disp('Eigen Values of Transpose(A) * A ='), disp(diag(D))
disp('Eigen Vectors of Transpose(A) * A ='), disp(V)
fprintf('\nPart (c)\n--------------------------------\n')
[U, S, V] = svd(A);
fprintf('SVD of A:\n----------------\n')
disp('U ='), disp(U)
disp('S ='), disp(S)
disp('V ='), disp(V)
Output: