# Matrices/Linear system/Introduction/Section

A system of linear equations can easily be written with a matrix. This allows us to make the manipulations which lead to the solution of such a system, without writing down the variables. Matrices are quite simple objects; however, they can represent quite different mathematical objects (e.g., a family of column vectors, a family of row vectors, a linear mapping, a table of physical interactions, a relation, a linear vector field, etc.), which one has to keep in mind in order to prevent wrong conclusions.

## Definition

Let $K$ denote a field, and let $I$ and $J$ denote index sets. An $I\times J$-matrix is a mapping
    $I\times J\longrightarrow K,(i,j)\longmapsto a_{ij}.$
If $I=\{1,\ldots ,m\}$ and $J=\{1,\ldots ,n\}$, then we talk about an $m\times n$-matrix. In this case, the matrix is usually written as
    ${\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\a_{21}&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\ldots &a_{mn}\end{pmatrix}}.$
We will usually restrict to this last situation.
For every $i\in I$, the family $a_{ij}$ , $j\in J$, is called the $i$-th row of the matrix, which is usually written as a row tuple
(or row vector)
    $(a_{i1},a_{i2},\ldots ,a_{in}).$
For every $j\in J$, the family $a_{ij}$ , $i\in I$, is called the $j$-th column of the matrix, usually written as a column tuple (or column vector)
    ${\begin{pmatrix}a_{1j}\\a_{2j}\\\vdots \\a_{mj}\end{pmatrix}}.$
The elements $a_{ij}$ are called the entries of the matrix. For $a_{ij}$, the number $i$ is called the row index, and $j$ is called the column index of the entry. The position of the entry $a_{ij}$ is where the $i$-th row meets the $j$-th column. A matrix with $m=n$ is called a square matrix. An $m\times 1$-matrix is simply a column tuple (or column vector) of length $m$, and an $1\times n$-matrix is simply a row tuple (or row vector) of length $n$. The set of all matrices with $m$ rows and $n$ columns (and with entries in $K$) is denoted by $\operatorname {Mat} _{m\times n}(K)$, in case $m=n$ we also write $\operatorname {Mat} _{n}(K)$.
Two matrices $A,B\in \operatorname {Mat} _{m\times n}(K)$ are added by adding entries with corresponding entries. The multiplication of a matrix $A$ with an element $r\in K$ (a scalar) is also defined entrywise, so
    ${\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\a_{21}&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\ldots &a_{mn}\end{pmatrix}}+{\begin{pmatrix}b_{11}&b_{12}&\ldots &b_{1n}\\b_{21}&b_{22}&\ldots &b_{2n}\\\vdots &\vdots &\ddots &\vdots \\b_{m1}&b_{m2}&\ldots &b_{mn}\end{pmatrix}}={\begin{pmatrix}a_{11}+b_{11}&a_{12}+b_{12}&\ldots &a_{1n}+b_{1n}\\a_{21}+b_{21}&a_{22}+b_{22}&\ldots &a_{2n}+b_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}+b_{m1}&a_{m2}+b_{m2}&\ldots &a_{mn}+b_{mn}\end{pmatrix}}\,$
and
    $r{\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\a_{21}&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\ldots &a_{mn}\end{pmatrix}}={\begin{pmatrix}ra_{11}&ra_{12}&\ldots &ra_{1n}\\ra_{21}&ra_{22}&\ldots &ra_{2n}\\\vdots &\vdots &\ddots &\vdots \\ra_{m1}&ra_{m2}&\ldots &ra_{mn}\end{pmatrix}}\,.$
The multiplication of matrices is defined in the following way.

## Definition

Let $K$ denote a field, and let $A$ denote an $m\times n$-matrix and $B$ an $n\times p$-matrix over $K$. Then the matrix product
    $AB$
is the $m\times p$-matrix, whose entries are given by
    $c_{ik}=\sum _{j=1}^{n}a_{ij}b_{jk}\,.$
A matrix multiplication is only possible when the number of columns of the left-hand matrix equals the number of rows of the right-hand matrix. Just think of the scheme
    $(ROWROW){\begin{pmatrix}C\\O\\L\\U\\M\\N\end{pmatrix}}=(RC+O^{2}+WL+RU+OM+WN)\,,$
the result is an $1\times 1$-Matrix. In particular, one can multiply an $m\times n$-matrix $A$ with a column vector of length $n$ (the vector on the right), and the result is a column vector of length $m$. The two matrices can also be multiplied with roles interchanged,
    ${\begin{pmatrix}C\\O\\L\\U\\M\\N\end{pmatrix}}(ROWROW)={\begin{pmatrix}CR&CO&CW&CR&CO&CW\\OR&O^{2}&OW&OR&O^{2}&OW\\LR&LO&LW&LR&LO&LW\\UR&UO&UW&UR&UO&UW\\MR&MO&MW&MR&MO&MW\\NR&NO&NW&NR&NO&NW\end{pmatrix}}\,.$

## Definition

An $n\times n$-matrix of the form
    ${\begin{pmatrix}d_{11}&0&\cdots &\cdots &0\\0&d_{22}&0&\cdots &0\\\vdots &\ddots &\ddots &\ddots &\vdots \\0&\cdots &0&d_{n-1\,n-1}&0\\0&\cdots &\cdots &0&d_{nn}\end{pmatrix}}$

## Definition

The $n\times n$-matrix
    $E_{n}:={\begin{pmatrix}1&0&\cdots &\cdots &0\\0&1&0&\cdots &0\\\vdots &\ddots &\ddots &\ddots &\vdots \\0&\cdots &0&1&0\\0&\cdots &\cdots &0&1\end{pmatrix}}\,$
The identity matrix $E_{n}$ has the property $E_{n}M=M=ME_{n}$, for an arbitrary $n\times n$-matrix $M$.

## Remark

If we multiply an $m\times n$-matrix $A=(a_{ij})_{ij}$ with an column vector $x={\begin{pmatrix}x_{1}\\x_{2}\\\vdots \\x_{n}\end{pmatrix}}$, then we get
    $Ax={\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\a_{21}&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\ldots &a_{mn}\end{pmatrix}}{\begin{pmatrix}x_{1}\\x_{2}\\\vdots \\x_{n}\end{pmatrix}}={\begin{pmatrix}a_{11}x_{1}+a_{12}x_{2}+\cdots +a_{1n}x_{n}\\a_{21}x_{1}+a_{22}x_{2}+\cdots +a_{2n}x_{n}\\\vdots \\a_{m1}x_{1}+a_{m2}x_{2}+\cdots +a_{mn}x_{n}\end{pmatrix}}\,.$
Hence, an inhomogeneous system of linear equations with disturbance vector ${\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{m}\end{pmatrix}}$, can be written briefly as
    $Ax=c\,.$
Then, the manipulations on the equations, which do not change the solution set, can be replaced by corresponding manipulations on the rows of the matrix. It is not necessary to write down the variables.