










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Different ways of decomposing matrices, including the singular value decomposition (SVD) and QR-decomposition. It explains the utility of these decompositions and their applications, such as finding solutions to least squares problems and compressing/transmitting data efficiently. The document also provides theorems and definitions related to SVD, including the definition of singular values. It includes examples and exercises for practice.
Typology: Study notes
1 / 18
This page cannot be seen from the preview
Don't miss anything!











6.1 Introduction Objectives 6.2 Singular Value Decomposition 6.3 Applications of SVD Least Squares Solution Data Compression 6.4 QR-decomposition
6.6 Solutions/Answers
In your undergraduate studies you would have studied about the LU decomposition of a matrix. In Block 1, you have also seen that diagonalisable matrices can be decomposed as P-'DP, where P is non-singular and D is a diagonal matrix. In this unit, we will consider some other ways of decomposing matrices, and the utility of d such decompositions.
To start with, in Sec. 6.2, we focus on a decomposition of any matrix as a product of 3 ? matrices. This is called the singular value decomposition, since the middle matrix in the decomposition of A has the singular values of A along its principal diagonal, and zero entries elsewhere.
This way of decomposkg a matridlinear transformation has various applications. We take up some of these in Sec. 6.3. The first application pertains to a method for finding solutions to the least squares problem, which you first encountered in Unit 4. This method is related to the one done in Sec. 4.5, but more efficient in practice. The second application that we discuss is for transmitting data efficiently, particularly images.
Sec. 6.4 is about the QRdecomposition of matrices, i.e., any m x n matrix with real entries and of rank n can be written as a product of an orthogonal matrix Q and an upper triangular matrix R. We also discuss some advantages of a QR-decomposition of a matrix, one such being another efficient method for obtaining the least squares solution.
Objectives
b After studying this unit, you should be able to
compute the singular values of a linear transformation/ matrix, and obtain its singular value decomposition; apply the singular value decomposition for obtaining least squares solutions;
explain how the singular value decomposition can be applied for compressing and transmitting data efficiently;
obtain the QRdecomposition of an m x n matrix over R of rank n;
apply the QR-decomposition of a matrix to obtain least squares solutions.
Applications of Unitary
So far you have studied that A E M, (C) can be (Schur) decomposed as A = U*BU,where B is upper triangular and U is unitary. Let us try and see if we can
terms of the singular values of the matrix. To appreciate this, you would need some background, which we provide below.
otherwise AAand hence A, would be zero). ~ e tAAV= hv. Then, hvev = v'hv = (Av)(Av) 2 0 3 h 2 0. Thus, all eigenvalues of AAare non-negative. So, A'A is positive semi-definite.
Similarly, you ccn show that AA* is positive semidefinite.
Proof: h is an eigenvalue of AA* -3v+O such that AAv=hv 3 AA (Av) = h (Av) and A*v # 0 (why?).
and their algebraic multiplicities, will be the same.
This remark leads us to the following definition.
For instance, to obtain the singular values of A = 2 2 ,we consider the eigenvalues [::I of AA or A A. Since AA is of smaller size, we take that. 9 9 Now AA = [ 1. Its ;igenvalues are 18,O. 9 9 Therefore, the eigenvalues of AA* are 18, Q, 0.
Matrices
Let us look at some examples. r 11
Then A = USV*
Example 2: Find the SVD for A = [1 1 3 51.
Solution: From Example 1, we have At = USV' (as defined in Example 1). So, A=[l][6 0 0 ~ ] ~ ' i s t h e S V D.
Example 3: Find the SVD for A =
AA* = -1 2 -1 has eigenvalues 3,1,O, with corresponding1.i. eigenvectors
Matrix Decompositions
Then A = U S V '
E x a m ~ l e 4: Find the SVD for A = 1 ' 4 4 ' 1
Solution: AA* = [::E], and its eigenvalues are 81 and 9.
(Can youj?nd these eigenvalues without computing the characteristicpolynomial? Note that
i) the row sum is^ 81,^ so one of the eigenvalues is^ 81,^ and
This shows that the singular values of A are 9 and 3, and rank(A) = 2.
v, = r] v2, =I : [ respect- 1 y. io, take v = - [' ' 1. , E l - 1
corresponding to the eigenvalue 8 1, and the second column is a nonnalised eigenvector of AA* corresponding to the eigenvalue 9. To obtain these eigenvectors
seen in the proof of Theorem 3, that is, if v is an eigenvector of A*A corresponding to
So, the eigenvectors of AA* corresponding to these eigenvalues are A[!] = I:] and
A[;J = :1,respectiveiy. Hence, the corresponding nonnalised eigenvectors are
Now, the third column of U is the eigenvector corresponding to the eigenvalue 0 of
2 28 2 ] I::[
Let A = USV* be the SVD of A. Then
Matrix
NOW,W U ( S ~ - C ) ~ = tr(~(~y-c)[(u(s~-c)]')=tr(~(~y-c)(sy-c).u)*
= tr ((sy - c)(sy - c)*U'U) = ]Isy- c(I2.
So, x minimizes IAx - bl iff y (= V*X)minimizes IIsy- ell.
Hence, I ( s ~-c(( is the least if we choose yi such that a,yi - c, = 0 for i = 1,. ..,r and
Sy-c=
Let us consider an example.
Example 5: Obtain the least squares solution to Ax = b, where
OnYn -Cn -%+I
A = 2 2 and b =
Y n
Solution: In Sec. 6.2, you found the singular value of A as 3&. Check that the SVD for A is USV*, where
. y = p 5 ].
Applications of Unitary Try^ a related exercise now.
E6) Use the^ SVD^ of^ A^ (in^ Example^ 4)^ to obtain a least squares solution for
-=[I.
Over here, a remark about the practical aspect of this approach to solving a least
measurement errors. So, very small singular values of A can be treated as zero, without too much difference in output, but with a lot of saving in computation time.
Let us now look at an alternative approach for obtaining the least squares solution, which uses the following concept.
Definition: 1) A generalized inverse of an m x n matrix A is an n x m matrix G such that AGA = A.
his inverse was 2)^ An^ n^ x^ m matrix^ G^ is called the^ Moore-Penrose^ inverse^ of an m^ x^ n matrix^ A, independently defined by E.H.Moore (in 1920) and and is denoted by^ A',^ if^ G^ satisfies Roger Penrose (in 1955). i) AGA= A;
ii) GAG= G; and
iii) AG and GA are Hermitian.
Note: 1) A matrix can have more than one generalised inverses. For example,'if
A = [l '1, then A itself, as well as the identity matrix I,, are generalisd 0 0 inverses of A.
If A is an n x n matrix which is invertible, then A-' is the unique generalized inverse of A.
It can be shown that the Moore-Penrose inverse of a matrix, if it exists, is unique.
Now let us consider A = USV*,the SVD of A, where S is an m x n matrix. Let the singular values of A be o, 2 o, 2 .. .2 or > 0. We define S' = [aij], an n x m matrix, with a,, = for i = 1. ...,r and all other Yi aij = 0.
Then S' is the Moore-Penrose inverse of S. You can check that A+= VS+U.*
Now we see how this can be used to find a least squares solution.
Theorem 5: Let A = USV*be the SVD of the m x n matrix A of rank r. Then
ii) Among all the least squares solutions of Ax = b, x, has the minimum norm.
ii Applications of Unitary To understand the process, let us take a much smaller matrix, say^ A,^ of size 50^ x^ 30.
information about this matrix that it is of rank 5. So the matrix has 5 linearly independent rows or (columns) and the remaining rows / columns are a linear combination of these. So, instead of sending 1500 data points, we can send far less
data.
and all other columns of A are a linear combination of these columns. Suppose the
Now, suppose j, # 1, and the first column of A is a, j, + a, j, + ... + a, j,. Then instead of sending the 50 entries of the 1" column, we can send just the 5 entries a,, a,, ...,a,. Similarly for the other 24 columns. If we do this how much minimum data do we need to obtain A? We need the five linearly independent columns with 50 entries each, 5 numbers for their places, and 5 sets of numbers each (that give the coefficients) for the remaining 25 columns. Therefore, instead of 1500 data points, we need to send (5x 50) + 5 + (25x 5) = 380 data points only, which, as you can see, is a considerable saving! So, this method is useful. However, finding the linearly independent rows or columns for large matrices is difficult, and hence not a preferred method. This is where the singular value decomposition is very useful.
Very efficient softwares to determine the SVD of a matrix are available. The idea used for creating the software can be illustrated with the help of the same matrix A of size 50 x 30 and of rank 5. Its SVD is of the form
Now, instead of transmitting the entries of A we transmit the entries of the right side of the equation above. Thus, to generate all the entries of A, we need the 5 non-zero
required earlier, but there is a considerable saving in computation time vis-A-vis obtaining the linearly independent rows/columns of A.
and therefore contain redundant information. So, if we remove the redundant information, our transmission will be more efficient. This is done by using appropriate approximations to the matrix representing the image, i.e., the data matrix. Suppose an
larger singular values will be able to give us a good enough reconstruction of the
neglecting very small singular values gives a small error, we can afford to ignore some singular values. The advantage of this will be that we would send far fewer entries, which would be cheaper and quicker!
p singular values. Then we get another matrix, A, = US,V' ,called the rank p
error in doing so is
This process of reconstructing images is also known as applying the KLT (Karhunen- Loeve Transform).
To see examples of how the image reconstruction alters using rank 1, rank 2 or other
Try a related exercise now.
El 1) Find a rank 1 approximation of 1 ; ,and the error involved in using this L - instead of the given matrix for data reconstruction.
orthogonalisation process. We will now study the matrix form of this process. We
Let A be an m x n matrix whose columns u, ,u, , ...,u, are linearly independent. So,
Gram-Schmidt process to the basis elements, we obtain an orthononnal basis
llvi II
know that 1 ui = C r j=, J1 ..q. J V i = l , ..., n.
n = C T ~ ~qj, where rj+,;= O = r ~ + 2I. =...=mi. J=I
A=[u, U, ... u,]=QR.
Take g =
Note that R is non-singular.
With this, we have just proved the following result.
Matrlx Decompositions
What is the use of the QR-decomposition? It mainly helps us simplify the process of solving the least squares problem Ax = b, where the columns of A are linearly
independent. This is because if A = QR, then A'A = RtR. Then the least squares
solution of Ax = b is the solution of the system Rx = Qt b (see Theorem 9, Unit 4).
And, this is just backward substitution since R is upper triangular. Let us consider an example.
b=[2 3 1 21t.
Solution: Rx = Qt b gives 0
I 0
So a least squares solution is 141
Here are some related exercises.
E15) Find the least squares solution to Ax = b using the QRdecomposition of
E16) Use the QRdecomposition of A to solve E5.
at what we have studied so far.
In this unit, we have covered the following points
linear tmnsformation.
squares solutions for Ax = b.
Matrix Decompositions
Applications of Unitary 3. Applying SVD for transmitting data efficient after compressing. Matrices
you have achieved each of them. One way to judge this is if you have solved each exercise in this unit on your own. You can also match your solutions with those given in Sec. 6.6., to make sure your reasoning and answers are correct.
E 1) A A ~ = [ ,I. Its eigenvalues are 360 and 90.
So, the singular values of A are 6 f i and 3 d 5 We obtain u, and u, as normalized eigenvectors corresponding to 360 and 90.
Yfi s o u , = [ Yfi],u2=[yfi] Yfi
Its eigenvalues will have to be 360,90,O (Why?) The corresponding eigenvectors will be
E2) Let A^ =^ U*BU, where U is unitary and B is upper triangular with
n n Then tr(AA) = ~~(uBBu)= tr(BB)= Z Zlbij12 2 2kil j=I i=1 14
and BA are defined.
Finally tr(AA*) = h o!, since the trace of a matrix is the sum of its i=l
Then X * A ~= X * U S V * ~ = w * ~ t ,where w = UX,t =Vey Hence I X * A ~ = IWS t 1
4 Applications of Unitary Matrices 4 ;
Since n = 2 = r in this case, x, is the only least squares solution of Ax = b.
i) STS = S, ii) TST = T, iii) ST and TS are Hermitian. Therefore, T = S+.
mxn
Let T =
Similarly, you should use this to check that VS'U* is the Moore-Penrose inverse
0, :
-^0 :^^04
.......
I:] So A+ =[I] [): 0 01 Ut
ii)
Then x,=A'b=-[1 2 - 9
Now, the rank 1 approximation is A, = U [i:]u t , and
i) By the Gram-Schmidt orthogonalisation process, we get
Matrix Decompositions
since