How can I find a matrix which is orthogonal to another matrix?
Show older comments
I have a matrix A, and want to find the matrix B which is orthogonal to A. How can I do it in Matlab?
e.g. A=[1,2;2,3;3,4]
Thank you in advance!
9 Comments
Torsten
on 9 Feb 2018
Define "orthogonal" for rectangular matrices.
Best wishes
Torsten.
Torsten
on 9 Feb 2018
?
Torsten
on 9 Feb 2018
In the above case you want to find a row vector v such that
v*[1;2;3] = v*[2;3;4] = 0
?
Is this correct ?
Best wishes
Torsten.
Yang Yue
on 9 Feb 2018
Torsten
on 9 Feb 2018
The only solution I can think of is null(A), the kernel of the matrix.
help null
Best wishes
Torsten.
Yang Yue
on 9 Feb 2018
Jan
on 9 Feb 2018
@Yang Yue: You have repeated some times now, that you want a matrix "orthogonal to a rectangular matrix", but you did not define this expression. Orthogonality of matrices is known for square matrices. So please explain mathematically the wanted properties of the matrix.
Yang Yue
on 9 Feb 2018
Accepted Answer
More Answers (2)
Maybe you mean the QR decomposition:
A = [1,2; 2,3; 3,4]
[Q, R] = qr(A)
Now Q is an orthogonal matrix, or in other words: Q*Q' == eye(3) . But it is not "orthogonal to A". But please explain, what this exactly means. Perhaps:
A * B == eye(3)
or
B * A == eye(2)
?
8 Comments
Yang Yue
on 9 Feb 2018
Yang Yue
on 9 Feb 2018
Yang Yue
on 9 Feb 2018
Torsten
on 9 Feb 2018
Z = null(A)
gives you the matrix orthogonal to A.
https://de.mathworks.com/help/matlab/ref/null.html
Best wishes
Torsten.
Yang Yue
on 9 Feb 2018
Torsten
on 9 Feb 2018
For your matrix, only x=[0; 0] satisfies A*x=0.
Check the result with A = [1 2 3; 2 3 4].
Best wishes
Torsten.
Yang Yue
on 9 Feb 2018
Christine Tobler
on 9 Feb 2018
Edited: Christine Tobler
on 9 Feb 2018
0 votes
The concept of orthogonality for a matrix is defined for just one matrix: A matrix is orthogonal if each of its column vectors is orthogonal to all other column vectors and has norm 1. The concept of two matrices being orthogonal is not defined.
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!