% demonstration of range space of a matrix and kern(A')
a = [1 0 1;.5 .5 1;0 1 1];
A=a;
close all
[u,s,v]=svd(a);fprintf('Singular Values'),
diag(s),
plot3([0;a(1,1)],[0;a(2,1)],[0;a(3,1)]),hold
plot3([0;a(1,2)],[0;a(2,2)],[0;a(3,2)])
plot3([0;a(1,3)],[0;a(2,3)],[0;a(3,3)])
plot3([0;u(1,1)],[0;u(2,1)],[0;u(3,1)],'r')
plot3([0;u(1,2)],[0;u(2,2)],[0;u(3,2)],'r')
plot3([0;u(1,3)],[0;u(2,3)],[0;u(3,3)],'r')
grid

