[Note:] If the numerical matrix computations turn out to be tedious, you may use the function rref in Matlab.