how to calculate the left null space of a matrix in matlab

To calculate the left null space of a matrix in MATLAB, you can use the null function with the 'left' option. The output of this function will give you a matrix where each column is a vector in the left null space.

Here is an example:

main.m
A = [1 2 3; 4 5 6; 7 8 9];
N = null(A', 'left');
49 chars
3 lines

In this example, A is a 3 x 3 matrix. We take the transpose of A and pass 'left' as an option to the null function. The output N is a matrix with 1 column, since the null space of A' (i.e. the left null space of A) is 1-dimensional.

If we want to find a basis for the left null space, we can use the orth function:

main.m
B = orth(N);
13 chars
2 lines

This will give us a matrix B where each column is a basis vector for the left null space of A.

gistlibby LogSnag