# Defintion of a matrix – Serlo

Zur Navigation springen Zur Suche springen
• ↳ Project "Serlo"
• ↳ Linear algebra
Contents "Linear algebra"
• Vector spaces • Linear combinations, generators and bases • Linear maps • Matrices • Introduction: Matrices • Defintion of a matrix • Vector space structure on matrices 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 ${\begin{pmatrix}1&{-2}\\4&0\\3&5\end{pmatrix}}$ .

We denote the entire arrangement of numbers by ${\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 ${\mathcal {M}}$ above has 3 rows and 2 columns. We call it a $3\times 2$ matrix to indicate its size. Another way to indicate the size is to say, ${\mathcal {M}}$ is of type $(3,2)$ of matrix.

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

Hint

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

Matrices do not necessarily have to contain numbers. In order to indicate that a matrix of type $(m,n)$ has entries, which are elements of some ring $R$ , we write${\mathcal {M}}\in R^{m\times n}$ . In that case, ${\mathcal {M}}$ is called a matrix of type $(m,n)$ over $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 $A=(a_{ij})$ and $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
$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 $(3\times 2)$ is not the same as the zero matrix of type $(2\times 3)$ , even though we call both of them a "zero matrix".

## Examples

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

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

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

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

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

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

Definition

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

Example

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

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

Then its transposed matrix is given by

$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 $1\times n$ are usually called (row) vectors and written with only one index, i.e.

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

### Column vectors

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

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

### Zero matrices

A matrix in which every entry is $0$ is called a zero matrix. The $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)

${\begin{pmatrix}0&0\\0&0\end{pmatrix}}\in \mathbb {Z} ^{2\times 2}$ ${\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:

$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. $d_{ij}=0$ for $i\neq j$ .

The general shape of the diagonal matrix is:

$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)

$\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.

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

The general shape of the unit matrix is:

$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 $\delta _{ij}$ for $i,j\in \mathbb {N}$ by $\delta _{ii}=1\ \forall i$ and $\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 $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:

$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:

$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: $A\,=\,{A}^{T}$ This is true if and only if $a_{ij}=a_{ji}\ \forall i,j=1,...,n$ .

Example (Symmetric matrix)

$A={\begin{pmatrix}2&4&6\\4&3&8\\6&8&1\end{pmatrix}}=A^{T}$ Visually, $A=A^{T}$ means that the entries of the matrix are mirrored along the diagonals.