Orthogonality by Singular value decomposition "svd"
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to use the Singular value decomposition "svd" to perform the Orthogonalization between vectors?
3 Commenti
Torsten
il 27 Gen 2023
Spostato: John D'Errico
il 27 Gen 2023
Never heard of this method. According to the literature link, it seems to be strongly coupled with a physics application. So I suggest you read the article referenced if you think it might be of help for your application, too.
Löwdin, Per-Olov (1970). "On the nonorthogonality problem". Advances in quantum chemistry. Vol. 5. Elsevier. pp. 185–199.
Risposte (1)
John D'Errico
il 27 Gen 2023
Seems easy enough.
A = randi(5,[5,3])
rank(A)
So A is a simple matrix, with rank 3. There are 3 vectors that would form a basis for the column space of A.
Using the SVD, can we find such a set of vectors? Yes.
[U,S,V] = svd(A,0);
U
The matrix U is exactly what you want. The vectors are orthonormal (so both orthogonal and having unit norm.)
U'*U
We get an identity matrix. (To within floating point trash. the -0.0000 elements are all essentially on the order of +/- eps.)
And U has the property that they span the column space of A. So ANY of the columns of A can be represented as some linear combination of the columns of U. The SVD essentially provides the transformation to orthogonality you seem to be asking to get. If you want, it has orthognalized the columns of A.
2 Commenti
John D'Errico
il 27 Gen 2023
Modificato: John D'Errico
il 27 Gen 2023
What does it mean to have a matrix orthogonalized with a vector? I'm sorry, but that statement makes little mathematical sense. As well, what are you talking about in terms of an orthogonalization test?
If you want better help, then you need to ask meaningful questions. Sorry, but true. It seems as if you are throwing around a lot of jargon that you don't really understand. Perhaps this is what you are asking:
X = 1:5;
Xnull = null(X)
V is a vector. And the matrix Vnull is a set of vectors that span the nullspace of V. Two vectors ar e orthogonal if their dot product is zero. Is that the test you were asking about?
X*Xnull
As you should see, the dot products of X with each of the vectors in Xnull are zero, to within floating point trash.
Xnull'*Xnull
As well, you should see this is the 4x4 identity matrix, so we see that Xnull is indeed a set of orthonormal vectors.
I used NULL to do the work. But if you look carefully at the code for NULL (it is not built-in), you would see it just calls SVD. I could also have done this:
[U,S,V] = svd(X');
Now the set of nullspace vectors are just given as
U(:,2:end)
As you can see, this is what null returns. And null just uses SVD anyway. So just use null, if that is what you need.
I'm only making random guesses here, since I have no idea what you are really asking.
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!