# SVD question

I did some problems from the example and the questions at end of chapter. I got all of them right except this one.

Problem Statement:

Consider the matrix [3 0; 0 -2]. Find its singular value decompositions

Problem Solution

Goal is to find A = U*S*V as below

Step1: Find AA', A'A. In this case they both are equal and are [9 0; 0 4];

Step2
: Find U = eig vector (AA'). Doing so gives [1 0; 0 1];

Step 3: Find S = [3 0; 0 2] (I am not showing the steps)

Step 4: Find V = eig vector (A'A). Doing so gives [1 0; 0 1];

Verify: Multiply U*S*V and it should give back A.

My problem is it gives [3 0; 0 2] which is different than A = [3 0; 0 -2].

I know that if I change V to [1 0 ; 0 -1] I will get A back. But why do my computations not show this. What am I missing?

Like I said, I did the above procedure for a lot of other numbers and I get it right. Only when I have a negative value in the matrix then it seems I am missing a -1 factor which I cannot get from my procedure.

Thanks

Asif

Related Calculus and Beyond Homework Help News on Phys.org
Dick
Homework Helper
I'm not really sure exactly what recipe you are following. Can you tell us where you found the algorithm? U could also be [[1,0],[0,-1]]. I'm not sure what 'eig vector(AA')' means, for example.

Hi:

I am following the recipe from Linear Algebra with Applications (Steven J Leon)

Basically the text says on pg 346

- V matrix is the eigenvector of A'A
- U matrix is the eigenvector of AA'

I agree with you that U could also be as you said... But why didn't my calculations come up with that.

Thanks

Asif

Dick
Homework Helper
Well, I asked for that. I don't have that reference so I can't really tell you. Maybe somebody else does. But I still don't get exactly what "V matrix is the eigenvector of A'A" means. [0,1] is an eigenvector of A'A. But so is [0,-1]. I don't know how you are supposed to put the signs in. Maybe just by hand?

Last edited:
I am not typing the whole thing, so perhaps it is creating confusion

- The goal is to find SVD of a matrix A. Once we do this it will be comprised of 3 different matrices, U, S, V

- The text explains how to get S. It says compute A*A' and take the square root of the eigenvalues

- To get u: compute A*A' and find the eigen vector.

The example which I have, one can easily see that (1,1) or (1,-1) is the eigenvector. But what if I am given a problem in an exam which I cannot easily see. This is my main concern. I would have thought the math computation would have given this result.

Hope this clarifies

Thanks

Asif