%
% Figure 2 a
%
a1 = [1 2 0]'
a2 = [0 2 2]'
b = [0 6 4]'
C = [a1 a2 b]
rref(C)

for i = 0:6  zz(i+1,:) = (-2*i):2:(6-2*i); end
zz = zz';
x = 0:6;
y = 0:2:6;

hold off
mesh(x,y,zz)
hold on
plot3([0 0], [0 0], [-15 10], 'g')
plot3([0 6 6 0 0],[0 0 6 6 0],[0 0 0 0 0],'g')
plot3([0 b(1)], [0 b(2)], [0 b(3)], 'k')

%
% Figure 2 b
%
b = [1 6 4]'
C = [a1 a2 b]
rref(C)

hold off
mesh(x,y,zz)
hold on
plot3([0 0], [0 0], [-15 10], 'g')
plot3([0 6 6 0 0],[0 0 6 6 0],[0 0 0 0 0],'g')
plot3([0 b(1)], [0 b(2)], [0 b(3)], 'k')
