### Systems of linear equations and matrices: Matrices

### The notion of matrix

The word *matrix* has been used earlier in this chapter. It was a rectangular scheme of numbers for efficient bookkeeping in the *Gaussian elimination method*. In general, the word *matrix* (plural *matrices)* is used in mathematics for each rectangular diagram of numbers. Like vectors, matrices are useful in many places, not only for solving systems of linear equations.

Therefore, we now look at matrices in their own right, without the background of linear equations. For the time being, we limit ourselves to a few basic operations with matrices containing only numbers:

- The addition and multiplication, and scalar multiplication of matrices,
- special matrices like the zero matrix and the identity matrix,
- the transpose of a matrix,
- the inverse of a matrix.

The concept of matrix

A **matrix** is a rectangular diagram of numbers, usually surrounded by parentheses, for example,

\[

A=\left(\,\begin{array}{rrrr}

1 & 0 & 4 & -2\\

0 & 2 & 0 & 1

\end{array}\,\right)

\] In this example, the matrix is made up of 2 **rows** and 4 **columns.** The third column of \(A\) is equal to \( \begin{array}{r} 4\\0\end {array} \); we usually write this as a column vector \(\cv{4\\0}\). The second row of \( A\) consists of the series of numbers \(0\; 2\; 0\; 1\); we usually write this as a row vector \(\rv{0,2,0,1}\).

The **main diagonal** of a matrix is the diagonal which begins at the top left. In the example, the main diagonal consists of the numbers #1# and #2#.

If the matrix has \(m\) rows and \(n\) columns, then it is called an \((m\times n)\)-matrix. The pair of integers \(\rv{m,n}\) is also called the **size** or **shape** of the matrix. We often write this as #m\times n#. Our example is a \((2\times 4)\)-matrix; the matrix has size \(2\times4\).

A \((1\times 1)\)-matrix is always identified with the only element in it and is therefore considered to be a number. An \((m\times 1)\)-matrix has only one column. Such a matrix is called a **column vector**. A \((1\times n)\)-matrix has only one row. Such a matrix is called a **row vector**.

Matrices we often give in capitals, such \(A\), \(B\), and \(C\). The numbers in the matrix are called the **elements** of the matrix. The element on the \(i\)-th row and \(j\)-column is often denoted by subscripting the matrix symbol by #ij#, that is, #A_{ij}#. In other words, the first index indicates in which row the element is and the second index indicates in which column it is. We speak of the \((i,j)\)-element or element with index \(\rv{i,j}\).

If the matrix is denoted by a capital letter, then we often use the corresponding lower case letter for its elements: #a_{ij}#. We also write #A=(a_{ij})# or #A=(A_{ij})# to indicate a matrix and its elements. An #(m\times n)#-matrix looks like this: \[A=\matrix{a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots &\ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn}}\]

The set of all \((m\times n)\)-matrices is denoted by \(M_{m\times n}\). If we need to specify the set from which the elements are taken, we write #M_{m\times n}(\mathbb{R})#, #M_{m\times n}(\mathbb{C})#, etcetera.

Two matrices #A# and #B# are equal if they have the same size (that is to say, the number of rows of #A# is equal to the number of rows of #B#, and similarly for the number of columns), and if all corresponding elements in the two matrices are equal (that is, #a_{ij} = b_{ij}# for all admissible #i# and #j#).

We give some examples of special types of matrices that we use frequently.

Square matrix If the number of rows of a matrix is equal to the number of columns, then we speak of a **square matrix**. The general form of a square matrix is \[A=\matrix{a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & \ddots& \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn}}\]

Lower and upper triangular matrix A square matrix having only zeros below the main diagonal is called an **upper triangular matrix.** The general form of an upper triangular matrix of size #\rv{n,n}# is \[ B=\matrix{b_{11} & b_{12} & \cdots & b_{1n} \\ 0 & b_{22} & \cdots & b_{2n}\\ \vdots & \ddots & \ddots & \vdots\\ 0 & \cdots &0 & b_{nn}}\] We speak of a **lower triangular matrix** if the matrix is square and has only zeros above the main diagonal.

Diagonal matrix A square matrix whose only nonzero elements are on the main diagonal is called a **diagonal matrix**. The general form of a diagonal matrix is \[D=\matrix{d_{11} & 0 & \cdots & 0 \\ 0 & d_{22} & \ddots & \vdots\\ \vdots & \ddots & \ddots & 0 \\ 0 & \cdots & 0 & d_{nn} }\]

Identity matrix A diagonal matrix with only ones on the main diagonal is called an **identity matrix** or **unit matrix**; we denote it by the letter \(I\), or if the number of rows (and hence the number of columns) is equal to #n#, also #I_n#. Its general form is \[I=\matrix{1 & 0 & \cdots & 0 \\ 0 & 1 & \ddots & \vdots\\ \vdots & \ddots & \ddots & 0 \\ 0 & \cdots & 0 & 1 }\]

Zero matrix If all elements of a matrix are zero, then we call the matrix a **zero matrix **or a** null matrix**.

**Pass Your Math**independent of your university. See pricing and more.

Or visit omptest.org if jou are taking an OMPT exam.