%
% Example 3 from Sec 1.2
%

A = [0 3 -6 6 4 -5; 3 -7 8 -5 8 9; 3 -9 12 -9 6 15]

% Step 1: Obtain an echelon form.

A([3,1],:) = A([1,3],:)
A(2,:) = A(2,:) - A(1,:)
A(3,:) = A(3,:) - (3/2) * A(2,:)

% Step 2: Produce a reduced echelon form.

A(1,:) = A(1,:) - 6 * A(3,:)
A(2,:) = A(2,:) - 2 * A(3,:)
A(2,:) = (1/2) * A(2,:)
A(1,:) = A(1,:) + 9 * A(2,:)
A(1,:) = (1/3) * A(1,:)
