

b)  http://en.wikipedia.org/wiki/Gaussian_elimination
    describes Gauss elimination
    leading to rref = the row reduced echelon form
    (which is probably familiar).
    each row has a leading 1 (!), since the first
    non-zero number can always be turned into 1 by
    appropriate non-zero multiplication of the whole
    row. Also, UNDER such a leading one there are zeros
    only!! (so the subsequent rows have their leading
    ones, called PIVOT elements arranged in an echelon
    shape.
    Good that you ask, but why didn't you ask earlier?

c)  Matrices A,B have perpendicular column vectors if
    and only if   B' * A = 0  (or equiv., taking transposes)
    A' * B = 0 (matrix), right!

d)  If you have a

AN EXAMPLE of rref(C) was given in
http://student.maths.ed.ac.uk/uploads/MAT-3-MCC/v1hfeic1/edin0129a.m

C = A;  C(:,3:4) =  A(:,[1,2])*rand(2,2) C =
    0.0318    0.6948    0.5885    0.4006    0.6797
    0.2769    0.3171    0.3608    0.3364    0.6551
    0.0462    0.9502    0.8057    0.5494    0.1626
    0.0971    0.0344    0.0628    0.0758    0.1190
    0.8235    0.4387    0.6541    0.7231    0.4984
rref(C)
ans =
    1.0000         0    0.3517    0.5853         0
         0    1.0000    0.8308    0.5497         0
         0         0         0         0    1.0000
         0         0         0         0         0
         0         0         0         0         0

        % IT WORKS

        % Note that Gauss elimination does NOT
        % change the ROW space of a matrix!

It continues like this (talking about PIVOT elements):
rref(C)
ans =
    1.0000         0    0.3517    0.5853         0
         0    1.0000    0.8308    0.5497         0
         0         0         0         0    1.0000
         0         0         0         0         0
         0         0         0         0         0
disp('basis for the column space');
basis for the column space
disp('pivot elements are in 1,2,5');
pivot elements are in 1,2,5
CBAS =  C(:,[1,2,5])
CBAS =
    0.0318    0.6948    0.6797
    0.2769    0.3171    0.6551
    0.0462    0.9502    0.1626
    0.0971    0.0344    0.1190
    0.8235    0.4387    0.4984
rank(CBAS)
ans =
     3
OCBAS = orth(CBAS)
OCBAS =
   -0.5438   -0.2873    0.5239
   -0.4274    0.2494    0.4878
   -0.4715   -0.6535   -0.5066
   -0.0779    0.1105    0.0524
   -0.5415    0.6449   -0.4776
OCBAS' * OCBAS
ans =
    1.0000   -0.0000    0.0000
   -0.0000    1.0000    0.0000
    0.0000    0.0000    1.0000
home
PCOL =  OCBAS * OCBAS'
PCOL =
    0.6527    0.4164    0.1788    0.0381   -0.1411
    0.4164    0.4829   -0.2086    0.0864    0.1593
    0.1788   -0.2086    0.9061   -0.0620    0.0758
    0.0381    0.0864   -0.0620    0.0210    0.0884
   -0.1411    0.1593    0.0758    0.0884    0.9372
norm(PCOL * PCOL - PCOL)
ans =
  1.2485e-015
norm(PCOL - PCOL')
ans =
     0
norm(PCOL * C - C)
ans =
  1.2700e-015

Comment: THIS SHOWS that each of columns of C is left unchanged by the action of the matrix PCOL!!! So we have:
PCOL is a matrix, hence defines a linear mapping from R5 into R5. All the columns are left invariant.
But its columns ARE linear combinations of the columns (nr. 1,2,5) of C, hence it produces linear combinations of columns of C, hence it is a projection EXCACTLY on the column space of C (not more and not less). It was checked above also that it is a projection (the square is the same as the matrix, because if you apply a projection twice nothing! should change!)

Hope this helps. 



