Simply create you matrix M and apply the lu(M) function.

The manual gives details of the augmented matrix it returns, that is, it has the permutation P, L and U matrixes side by side in one big rectangular matrix.

The permutation matrix simply converts the original matrix M into an easier to solve (by the computer) matrix, for which the L and U are then provided.

In general, Mathcad is implicit (just use lu() ), rather than explicit (we don't write matlab code!)

It is possible to write a long(ish) programme function to do the pseudo code that may have been given in class, but usually we don't bother, given we have the function already ;-)

Philip