Title: | Mathematics at DEC |
Moderator: | RUSURE::EDP |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2083 |
Total number of notes: | 14613 |
hi, any one knows a routine that takes a square matrix A and returns 2 vectors that their products is A ? i.e A = uv, only A is given, and I need to find u and v. offcourse the solution is not unique. I think there is probably a routine already written for this. I thought I'll ask while Iam looking around. thank you, \nasser
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1760.1 | Overdetermined. | CADSYS::COOPER | Topher Cooper | Thu May 27 1993 20:45 | 11 |
1760.2 | you're both right | AUSSIE::GARSON | nouveau pauvre | Thu May 27 1993 22:39 | 14 |
re .0 Just off the top of my head, a solution exists iff each row of the matrix is a (real) multiple of the first row that is not all zeros, in which case the solution is non-unique and takes the form u = t * (a column giving the multiples) v = 1/t * (the first row that is not all zeros) where t is an arbitrary non-zero real number. [The special case where the matrix is entirely zeros, not covered by the above, has obvious solutions and many of them.] | |||||
1760.3 | SVD will test for this | GAUSS::ROTH | Geometry is the real life! | Thu May 27 1993 22:39 | 16 |
I assume you mean the matrix is the outer product of the vectors. A[i,j] = u[i]*v[j] The criteria for this is for A to be rank 1, since all rows or columns are scalar multiples of each other. The most numerically reliable way to get this would be based on a singular value decomposition since this would also indicate just how close A is to really satisfying this criteria. SVD routines are available in most linear algebra packages, and I have a copies of these. (See Numerical Recipes for another one; the latest edition fixes some bugs in the first edition.) - Jim | |||||
1760.4 | GAUSS::ROTH | Geometry is the real life! | Thu May 27 1993 22:45 | 7 | |
By the way, if the matrix *really* is rank 1, then you could simply normalize each row or column to be a unit vector. Then the norms will form one of your vectors (up to sign) and one of the unit vectors will form the other. - Jim |