An
where
where s=min(m,n) and
Note that if ATx≠0, then ATA and AAT both have the same eigenvalues:
AATx=λx(left-multiply both sides by AT)
ATAATx=ATλx ATA(ATx)=λ(ATx)The time-complexity for computing the SVD factorization of an arbitrary
In general, we can define the cost as:
O(m2n+n3)The SVD factorization of a non-square matrix
The following figure depicts the reduced SVD factorization (in red) against the full SVD factorizations (in gray).
In general, we will represent the reduced SVD as:
A=URΣRVTRwhere UR is a m×s matrix, VR is a n×s matrix, ΣR is a s×s matrix, and s=min(m,n).
We begin with the following non-square matrix,
and we will compute the reduced form of the SVD (where here s=3):
(1) Compute
(2) Compute the eigenvectors and eigenvalues of
(3) Construct
(4) Construct
(5) Find
We obtain the following singular value decomposition for
Recall that we computed the reduced SVD factorization (i.e.
Suppose A is a m×n matrix where m>n (without loss of generality):
A=UΣVT=[||||||u1⋯un⋯um||||||][σ1⋱σn⋮−0−][−vT1−⋮−vTn−]We can re-write the above as:
A=[||||u1⋯un||||][−σ1vT1−⋮−σnvTn−]Furthermore, the product of two matrices can be written as a sum of outer products:
A=σ1u1vT1+σ2u2vT2+...+σnunvTnFor a general rectangular matrix, we have:
A=s∑i=1σiuivTiwhere s=min(m,n).
If A has s non-zero singular values, the matrix is full rank, i.e. rank(A)=s.
If A has r non-zero singular values, and r<s, the matrix is rank deficient, i.e. rank(A)=r.
In other words, the rank of A equals the number of non-zero singular values which is the same as the number of non-zero diagonal elements in Σ.
Rounding errors may lead to small but non-zero singular values in a rank deficient matrix. Singular values that are smaller than a given tolerance are assumed to be numerically equivalent to zero, defining what is sometimes called the effective rank.
The right-singular vectors (columns of V) corresponding to vanishing singular values of A span the null space of A, i.e. null(A) = span{vr+1, vr+2, …, vn}.
The left-singular vectors (columns of U) corresponding to the non-zero singular values of A span the range of A, i.e. range(A) = span{u1, u2, …, ur}.
The rank of A is 2.
The vectors [1√21√200] and [−1√21√200] provide an orthonormal basis for the range of A.
The vector [001] provides an orthonormal basis for the null space of A.
If the matrix Σ is rank deficient, we cannot get its inverse. We define instead the pseudoinverse:
(Σ+)ii={1σiσi≠00σi=0For a general non-square matrix
For example, if we consider a m×n full rank matrix where m>n:
A+=[|...|v1...vn|...|][1/σ10…0⋱⋱1/σn0…0][||||||u1⋯un⋯um||||||]TThe induced 2-norm of a matrix A can be obtained using the SVD of the matrix :
‖A‖2=max‖x‖=1‖Ax‖=max‖x‖=1‖UΣVTx‖=max‖x‖=1‖ΣVTx‖=max‖VTx‖=1‖ΣVTx‖=max‖y‖=1‖Σy‖And hence,
‖A‖2=σ1In the above equations, all the notations for the norm ‖.‖ refer to the p=2 Euclidean norm, and we used the fact that U and V are orthogonal matrices and hence ‖U‖2=‖V‖2=1.
We begin with the following non-square matrix A:
A=[323882874187647].The matrix of singular values,
Consequently the 2-norm of
Following the same derivation as above, we can show that for a full rank n×n matrix we have:
‖A−1‖2=1σnwhere σn is the smallest singular value.
For non-square matrices, we can use the definition of the pseudoinverse (regardless of the rank):
‖A+‖2=1σrwhere σr is the smallest non-zero singular value. Note that for a full rank square matrix, we have ‖A+‖2=‖A−1‖2. An exception of the definition above is the zero matrix. In this case, ‖A+‖2=0
The 2-norm condition number of a matrix
If the matrix A is rank deficient, i.e. rank(A)<min(m,n), then cond2(A)=∞.
The best rank-k approximation for a m×n matrix A, where k<s=min(m,n), for some matrix norm ‖.‖, is one that minimizes the following problem:
minAk ‖A−Ak‖such thatrank(Ak)≤k.Under the induced
Observe that the norm of the difference between the best approximation and the matrix under the induced
Note that the best rank-k approximation to A can be stored efficiently by only storing the k singular values σ1,…,σk, the k left singular vectors u1,…,uk, and the k right singular vectors v1,…,vk.
The figure below show best rank-