e-Mathematics > Matrix Algebra

Examples

EXAMPLE 1. Define the matrix C, and perform the row reduction procedure.

> C = [1 -2 1 0; 0 2 -8 8; -4 5 9 -9]

> C(3,:) = C(3,:) + 4 * C(1,:)
> C(2,:) = (1/2) * C(2,:)
> C(3,:) = C(3,:) + 3 * C(2,:)
> C(1,:) = C(1,:) + 2 * C(2,:)
> C(1,:) = C(1,:) + 7 * C(3,:)
> C(2,:) = C(2,:) + 4 * C(3,:)

C =
   1   0   0  29
   0   1   0  16
   0   0   1   3
Thus, we have found the solution $ (x_1,x_2,x_3) = (29,16,3)$.

EXAMPLE 2. Solve the system of linear equations:

\begin{displaymath}
\begin{array}{rrrr}
x_1 & -\,3 x_2 & & = 5 \\
-x_1 & +...
...& +\, 5 x_3 & = 2 \\
& \, x_2 & +\, x_3 & = 0
\end{array}
\end{displaymath}


© TTU Mathematics