% Singular value decomposition

A=rand(3,5)
sigma=svd(A)

%

% singular value is the square root
% of eigenvalue of A*A'
eig(A*A')
sqrt(eig(A*A'))

%

[U,S,V] = svd(A)
%check that A=U*S*V'
A-U*S*V'
%check that U and V are unitary
U^(-1)-U'
V^(-1)-V'
%check that spectral norms of A and S are the same
norm(A)
norm(S)

%
%