# 1  Matrices and Systems of Linear Equations

When solving systems of linear equations the essential information of the system can be recorded compactly in a rectangular array called a matrix. We show it on an example.

Example Given the system of linear equations

 $\begin{array}{ccccccccc}3{x}_{1}& +& {x}_{2}& -& 4{x}_{3}& +& {x}_{4}& =& 1\\ {x}_{1}& & & +& 2{x}_{3}& -& {x}_{4}& =& 0\\ 2{x}_{1}& -& 3{x}_{2}& & & +& 3{x}_{4}& =& -1\end{array}$ (1.1)

coefficients of each variables are aligned in columns and we get

 $\left(\begin{array}{cccc}3& 1& -4& 1\\ 1& 0& 2& -1\\ 2& -3& 0& 3\end{array}\right)$ (1.2)

so called the matrix of the system (1.1).

If we add the right hand side as the last new column we get

 $\left(\begin{array}{cccc}3& 1& -4& 1\\ 1& 0& 2& -1\\ 2& -3& 0& 3\end{array}|\phantom{\rule{mediummathspace}{0.2em}}\begin{array}{c}1\\ 0\\ -1\end{array}\right)$ (1.3)

so called augmented matrix of the system (1.1).

Let us give a brief introduction what a matrix is.

A matrix $A$ is an arrangement of $m.n$ numbers as follows:

 $A=\left(\begin{array}{ccccc}{a}_{1,1}& \cdots & {a}_{1,j}& \cdots & {a}_{1,n}\\ ⋮& & ⋮& & ⋮\\ {a}_{i,1}& \cdots & {a}_{i,\phantom{\rule{mediummathspace}{0.2em}}j}& \cdots & {a}_{i,n}\\ ⋮& & ⋮& & ⋮\\ {a}_{m,1}& \cdots & {a}_{m,j}& \cdots & {a}_{m,n}\end{array}\right).$ (1.4)

A matrix of the form (1.4) is said to be of the type $m×n$, of an $m×n\phantom{\rule{mediummathspace}{0.2em}}$matrix. It has $m$ rows and $n$ columns; the entry ${a}_{i,j}\phantom{\rule{mediummathspace}{0.2em}}$in the $i$-th row and $j$-th columns is called the $\left(i,j\right)$-entry of $A$. For instance, the $\left(2,4\right)$-entry is the number ${a}_{2,4}$.

The columns of the matrix $A$ are

 $\left(\begin{array}{c}{a}_{1,1}\\ ⋮\\ {a}_{i,1}\\ ⋮\\ {a}_{m,1}\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\left(\begin{array}{c}{a}_{1,2}\\ ⋮\\ {a}_{i,2}\\ ⋮\\ {a}_{m,2}\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\dots ,\phantom{\rule{mediummathspace}{0.2em}}\left(\begin{array}{c}{a}_{1,n}\\ ⋮\\ {a}_{i,n}\\ ⋮\\ {a}_{m,n}\end{array}\right);$

the rows of $A$ are

 $\left(\begin{array}{ccccc}{a}_{1,1},& \cdots & ,{a}_{1,j},& \cdots ,& {a}_{1,n}\end{array}\right),\dots ,\left(\begin{array}{ccccc}{a}_{m,1},& \cdots ,& {a}_{m,j},& \cdots & ,{a}_{m,n}\end{array}\right).$

For a short we often write $A=\left({a}_{i,j}\right)$ instead of (1.4) making sure that the type of the matrix is clear from the context.

Example Consider the following matrix

 $A=\left(\begin{array}{ccccc}1& 2& -1& 3& 2\\ 3& 0& 1& 2& -2\\ 1& 0& 0& 3& 4\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}}.$ (1.5)

$A$ is a matrix of type $3×5$. Its columns are

 $\left(\begin{array}{c}1\\ 3\\ 1\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\left(\begin{array}{c}2\\ 0\\ 0\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\left(\begin{array}{c}-1\\ 1\\ 0\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\left(\begin{array}{c}3\\ 2\\ 3\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\left(\begin{array}{c}2\\ -2\\ 4\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}};$

its rows are

 $\left(1,2,-1,3,2\right)\phantom{\rule{mediummathspace}{0.2em}},\phantom{\rule{mediummathspace}{0.2em}}\left(3,0,1,2,-2\right),\phantom{\rule{mediummathspace}{0.2em}}\left(1,0,0,3,4\right).$

An $\left(i,i\right)$-entry ${a}_{i,i}\phantom{\rule{mediummathspace}{0.2em}}$is called a diagonal entry; the diagonal of the matrix $A$ is ${a}_{1,1},{a}_{2,2},\dots ,{a}_{n,n}\phantom{\rule{mediummathspace}{0.2em}}$for $n\ge m$, and ${a}_{1,1},{a}_{2,2},\dots ,{a}_{m,m}$ for $n\le m$.

The diagonal entries of the matrix (1.5) are: ${a}_{1,1}=1$, ${a}_{2,2}=0$, and ${a}_{3,3}=0$.

If a matrix has the same number of rows and columns, i.e. if it is $n×n$ matrix, then we call it a square matrix.

A matrix $A=\left({a}_{i,j}\right)$ is called upper triangular if all its entries bellow its diagonal are $0$. More precisely, an $m×n\phantom{\rule{mediummathspace}{0.2em}}$matrix $A=\left({a}_{i,j}\right)$ is upper triangular if ${a}_{i,j}=0$ for all $i>j$.

A matrix $A=\left({a}_{i,j}\right)$ is called lower triangular if all entries above its diagonal are $0$. More precisely, an $m×n\phantom{\rule{mediummathspace}{0.2em}}$matrix $A=\left({a}_{i,j}\right)$ is lower triangular if ${a}_{i,j}=0$ for all $i.

A square matrix which is both upper triangular and lower triangular is called a diagonal matrix. In other words, a matrix $A=\left({a}_{i,j}\right)$ is diagonal if ${a}_{i,j}=0$ for all $i\ne j$.

The matrix (1.5) is neither upper triangular nor lower diagonal. An example of an upper triangular matrix is the matrix $B$, an example of a lower triangular matrix is the matrix $C$ where

 $B=\left(\begin{array}{cccc}1& 0& -3& 7\\ 0& 0& 2& 3\\ 0& 0& -1& 2\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}},\phantom{\rule{mediummathspace}{0.2em}}C=\left(\begin{array}{ccc}1& 0& 0\\ 3& 0& 0\\ -1& 2& 1\end{array}\right)\phantom{\rule{mediummathspace}{0.2em}}.$