Find null space basis matlab

4.4k Views Asked by At

I want to find the basis of null space in matlab. I know that I can find it by simply running ns = null(A,'R') or Z = null(A) but I was wondering what would be the way to that by "hand". What I wanna way is; Is there a way to find the null space basis of a matrix by running many for loops and ifs? If yes could you please help

2

There are 2 best solutions below

0
On BEST ANSWER

If you can code up row-reduction by “hand”, then you should be able to use either of the methods described here to find a kernel basis.

1
On

Is there a way to find the null space basis of a matrix by running many for loops and ifs

Yes.

Wikipedia explains how you can use the Singular Value Decomposition to determine a basis for the nullspace of a matrix. The question then becomes "How do you calculate the SVD?", which wikipedia also answers, though its answer does not seem particularly enlightening. Maybe this is of more use.