# Defintion of a matrix – Serlo

Zur Navigation springen Zur Suche springen

Matrices are a concept from linear algebra. A matrix is a rectangular arrangement of elements from a ring with unit (i.e., elements, with which we can calculate like with numbers). Matrices can be used to simplify arithmetic operations such as addition and multiplication.

## What are matrices?

A matrix is a rectangular arrangement of numbers or objects that allow for computations, as if they were numbers. Mathematically speaking, the entries are elements of a ring with unit.

Example

An example of a matrix is ${\displaystyle {\begin{pmatrix}1&{-2}\\4&0\\3&5\end{pmatrix}}}$.

We denote the entire arrangement of numbers by ${\displaystyle {\mathcal {M}}}$ and call it a Matrix. The objects within the matrix are called components or entries.

The entries standing next to each other form a row of the matrix, the entries standing below each other form a column. The matrix ${\displaystyle {\mathcal {M}}}$ above has 3 rows and 2 columns. We call it a ${\displaystyle 3\times 2}$ matrix to indicate its size. Another way to indicate the size is to say, ${\displaystyle {\mathcal {M}}}$ is of type ${\displaystyle (3,2)}$ of matrix.

The component that is in the ${\displaystyle j}$-th row and in the ${\displaystyle k}$-th column is denoted by ${\displaystyle m_{jk}}$. For instance, within the the matrix ${\displaystyle {\mathcal {M}}}$ we have ${\displaystyle m_{11}=1}$ or ${\displaystyle m_{32}=5}$.

Hint

Attention: Within the indices of ${\displaystyle m_{jk}}$, the order matters: The row index ${\displaystyle j}$ comes first, followed by the column index ${\displaystyle k}$.

Matrices do not necessarily have to contain numbers. In order to indicate that a matrix of type ${\displaystyle (m,n)}$ has entries, which are elements of some ring ${\displaystyle R}$ , we write${\displaystyle {\mathcal {M}}\in R^{m\times n}}$. In that case, ${\displaystyle {\mathcal {M}}}$ is called a matrix of type ${\displaystyle (m,n)}$ over ${\displaystyle R}$.

## Equality of matrices

When are two matrices equal? In principle, one may define equality in several different ways. But there is one that makes by far the most sense:

Definition (Equality of matrices)

Two matrices ${\displaystyle A=(a_{ij})}$ and ${\displaystyle B=(b_{ij})}$ are equal if and only if:

1. Both matrices are of the same type, i.e. they have the same number of rows and columns.
2. All components of both matrices are equal
${\displaystyle a_{ij}=b_{ij}\qquad \forall i\in \{1,2,\ldots ,m\}{\text{ and }}\,\forall j\in \{1,2,\ldots ,n\}}$

Hint

Matrices of different types cannot be equal. For instance, the zero matrix of type ${\displaystyle (3\times 2)}$ is not the same as the zero matrix of type ${\displaystyle (2\times 3)}$, even though we call both of them a "zero matrix".

## Examples

Example (Matrices over ${\displaystyle \mathbb {Z} }$)

${\displaystyle {\mathcal {A}}={\begin{pmatrix}0&-5&2\\-3&1&1\\1&2&3\\4&0&7\end{pmatrix}}}$ is a ${\displaystyle 4\times 3}$-matrix.

Here, for example ${\displaystyle a_{12}=-5{\text{ and }}a_{33}=3}$.

${\displaystyle {\mathcal {B}}={\begin{pmatrix}3&5&1&-3\\0&1&0&1\end{pmatrix}}}$ is a ${\displaystyle 2\times 4}$-matrix.
${\displaystyle {\mathcal {C}}={\begin{pmatrix}4&-5\\0&0\\-2&1\end{pmatrix}}}$ is a ${\displaystyle 3\times 2}$-matrix.
${\displaystyle {\mathcal {D}}={\begin{pmatrix}1&3\\4&2\end{pmatrix}}}$ is a ${\displaystyle 2\times 2}$-matrix.

Example (Matrix over ${\displaystyle \mathbb {Q} [x]}$)

${\displaystyle {\mathcal {M}}={\begin{pmatrix}x^{2}&{\frac {1}{2}}x\\0&3x+5\end{pmatrix}}}$

## Transposed matrix

Definition

Let ${\displaystyle A=(a_{ij})}$ be a matrix in ${\displaystyle R^{m\times n}}$. Then we define the transposed matrix as ${\displaystyle A^{T}:=(a_{ji})\in R^{n\times m}}$.

Example

Let ${\displaystyle R=\mathbb {Z} }$ and define

${\displaystyle A={\begin{pmatrix}1&3\\4&2\\7&7\end{pmatrix}}\in \mathbb {Z} ^{3\times 2}}$.

Then its transposed matrix is given by

${\displaystyle A^{T}={\begin{pmatrix}1&4&7\\3&2&7\end{pmatrix}}\in \mathbb {Z} ^{2\times 3}}$.

## Some special cases

### Row vectors

Matrices of the type ${\displaystyle 1\times n}$ are usually called (row) vectors and written with only one index, i.e.

${\displaystyle (a_{1},a_{2},\cdots ,a_{n})}$.

### Column vectors

Matrices of the type ${\displaystyle m\times 1}$ are usually called (column) vectors and written with only one index, i.e.

${\displaystyle {\begin{pmatrix}a_{1}\\a_{2}\\\vdots \\a_{m}\end{pmatrix}}}$.

### Zero matrices

A matrix in which every entry is ${\displaystyle 0}$ is called a zero matrix. The ${\displaystyle 0}$ is the neutral element of the addition in our ring.

Hint

Attention, there is not only one zero matrix, but a separate zero matrix for each underlying set and each type.

Example (Some zero matrices)

${\displaystyle {\begin{pmatrix}0&0\\0&0\end{pmatrix}}\in \mathbb {Z} ^{2\times 2}}$
${\displaystyle {\begin{pmatrix}0_{\mathbb {Z} [x]}&0_{\mathbb {Z} [x]}\\0_{\mathbb {Z} [x]}&0_{\mathbb {Z} [x]}\\0_{\mathbb {Z} [x]}&0_{\mathbb {Z} [x]}\end{pmatrix}}\in (\mathbb {Z} [x])^{3\times 2}}$

### Square matrices

Matrices with the same number of rows and columns are called square matrices. A typical square matrix has the shape:

${\displaystyle A={\begin{pmatrix}a_{11}&\ldots &a_{1n}\\\vdots &\ddots &\vdots \\a_{n1}&\ldots &a_{nn}\end{pmatrix}}}$

Due to their special shape, some more interesting special cases can now occur among the square matrices.

### Diagonal matrices

Diagonal matrices' are square matrices that have non-zero entries only on the diagonal (from top left to bottom right), i.e. ${\displaystyle d_{ij}=0}$ for ${\displaystyle i\neq j}$.

The general shape of the diagonal matrix is:

${\displaystyle D={\begin{pmatrix}d_{11}&0&\ldots &0\\0&d_{22}&\ldots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\ldots &d_{nn}\end{pmatrix}}\qquad }$

Example (Diagonal matrix)

${\displaystyle \qquad D={\begin{pmatrix}3&0&0\\0&4&0\\0&0&5\end{pmatrix}}}$

As we will see later, diagonal matrices are particularly important if we understand them as a linear map on a finite dimensional vector space. Matrix multiplication and the calculation of inverses are much easier to perform with a diagonal matrix than with a generic matrix.

### Unit matrices

The unit matrix is a special case of the diagonal matrices. It is exactly that diagonal matrix for which all entries in the diagonal are equal to the unit 1 of the ring, i.e.

${\displaystyle d_{ii}=1\qquad \forall i=1,...,n\qquad }$ und ${\displaystyle \qquad d_{ij}=0\qquad \forall \,i\neq j}$.

The general shape of the unit matrix is:

${\displaystyle E={\begin{pmatrix}1&0&\ldots &0\\0&1&\ldots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\ldots &1\end{pmatrix}}}$

Definition (Kronecker symbol)

We define the Kronecker symbol ${\displaystyle \delta _{ij}}$ for ${\displaystyle i,j\in \mathbb {N} }$ by ${\displaystyle \delta _{ii}=1\ \forall i}$ and ${\displaystyle \delta _{ij}=0\ \forall i\neq j}$.

I.e. the Kronecker symbol is always equal to 0 if there are two different indices and it is equal to 1 if the indices are the same. Then the unit matrix can be written as ${\displaystyle E=(\delta _{ij})}$.

### Triangular matrices

By a triangular matrix we want to understand a square matrix which is characterised by the fact that all entries below or above the main diagonal are zero.

If the entries above the main diagonal are zero, then the matrix is called a lower triangular matrix. If, on the other hand, the entries below the main diagonal are zero, then the matrix is called an upper triangular matrix.

The general shape of a lower triangular matrix is:

${\displaystyle L={\begin{pmatrix}a_{11}&0&\ldots &0\\a_{21}&a_{22}&\ldots &0\\\vdots &\vdots &\ddots &\vdots \\a_{n1}&a_{n2}&\ldots &a_{nn}\end{pmatrix}}}$

The general shape of an upper triangular matrix is:

${\displaystyle R={\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\0&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\0&0&\ldots &a_{nn}\end{pmatrix}}}$

Among other things, triangular matrices play an important role in solving systems of linear equations. We will go into this in more detail in a further chapter.

### Symmetric matrices

A square matrix is called symmetric if it is equal to its transposed matrix, i.e. if: ${\displaystyle A\,=\,{A}^{T}}$ This is true if and only if ${\displaystyle a_{ij}=a_{ji}\ \forall i,j=1,...,n}$.

Example (Symmetric matrix)

${\displaystyle A={\begin{pmatrix}2&4&6\\4&3&8\\6&8&1\end{pmatrix}}=A^{T}}$

Visually, ${\displaystyle A=A^{T}}$ means that the entries of the matrix are mirrored along the diagonals.