On Thu, Feb 4, 2021 at 2:02 PM M F Hasler <mhasler@dsi972.fr> wrote:
Le mer. 3 févr. 2021 à 19:24, Henry Baker <hbaker1@pipeline.com> a écrit :
Input: an nxn(*) matrix M of floating point numbers (positive, negative or zero) which is *supposed* to have rank exactly one, i.e., it is the outer product of two n-element *unknown* vectors (...)
When M[i,j] = U[i] V[j], i.e., M = U V' where U and V are column vectors / matrices and ' = transpose, then the rows of M are M[i,.] = U[i] V' and the columns of M are M[.,j] = V[j] U. So any row of M, or any (nonzero) linear combination of these, is a possible choice for V', and similar for columns of M and U. In general, the larger the numbers, the less important should be the influence of small rounding errors.
So a valid choice could be to add up all of the rows, with signs flipped so that all the rows have the same "direction" (to avoid cancellations), to get a component-wise average, weighted by the respective norm, for V', and similar for U.
The problem with this is how you define "same direction" in n-dimentional space. You can't just look at the signs; two vectors may have the same sign in one coordinate and different signs in a second coordinate. If you flip one so that they have the same second coordinate, they have different first coordinates. A slightly more sophisticated approach would be to say that two vectors are in the "same direction" if their dot product is positive, so if their dot product is negative, flip one of them. But this doesn't work for more than two vectors, because the "same direction" relation is not transitive. Andy
I have a quite elegant solution and reasonably efficient solution,
but I wanted to see if anyone else had the same idea.
Does the above go in the same direction of your idea, Henry ?
- Maximilian _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com