Hi Steve,
You can update the null space iteratively using the previous computed basis. Suppose if there is already a computed orthonormal basis 'Q0' for the null space of the initial matrix C (with rows a1, a2) i.e
Q0 = null(C);
When an additional row
is added to the matrix, any vector x in the null space of the new matrix
must satisfy both:
, and
Since
, we can express any such 'x' as:
, for some vector 'y'. Substituting this into the second condition gives:
, for some vector 'y'. Substituting this into the second condition gives:
Which points that y should lie in null space of '
'You can refer to the below MATLAB snippet to implement this programatically:
C = [1 1 2 -1; 2 0 3 -1];
Q0 = null(C); % Orthonormal basis for the null space of C
a3 = [3 5 6 -1];
N_update = null(a3 * Q0);
% New null space basis for [C; a3]
Q_new = Q0 * N_update;
Additionally, you can also refer to the self-paced course on Linear algebra using MATLAB by MathWorks:
Hope this helps!
