# Find an orthogonal vector

조회 수: 174(최근 30일)
Samuel Hoppen 16 Feb 2021
댓글: Samuel Hoppen 16 Feb 2021
I have the following matrix: M = [3 18 0;-3 -2 5;-1 5 0;3 3 -9]
I need to find a vector that's orthogonal to all of the vectors in this matrix. I'm familiar with how to solve for a vector that's orthogonal to two vectors (solving for lambda and multiplying lambda by a vector), but not sure how to solve for multiple vectors. Any help is appreciated!

댓글을 달려면 로그인하십시오.

### 채택된 답변

John D'Errico 16 Feb 2021
Never call a variable O. Consider how difficult it will be to find the bug one day, when you see or write a zero, instead of O. And consider that in some fonts, the difference between them is very slight.
As to the question, use null.
help null
##### 댓글 수: 3표시숨기기 이전 댓글 수: 2
Samuel Hoppen 16 Feb 2021
Null(M) gave me a 3×0 empty double matrix. If I then calculate the dot product of null(M) and M, I get an error because the size of the vectors is different.

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by