# Mathematics for Applied Sciences (Osnabrück 2023-2024)/Part I/Lecture 21

The lectures of the next weeks deal with linear algebra. We fix a field $K$, and one might think of the real numbers $\mathbb {R}$. But since we are first concerned only with algebraic properties of $\mathbb {R}$, one might also think of the rational numbers. Starting with the theory of eigenspaces, also analytic properties like the existence of roots will be important.
    Systems of linear equations
In the context of polynomial interpolation, we have already encountered systems of linear equations.
Firstly, we give three further introductory examples, one from every day's life, one from geometry and one from physics. They all lead to systems of linear equations.

## Example

At a booth on the Christmas market, there are three different pots of mulled wine. All three contain the ingredients cinnamon, cloves, red wine and sugar, but the compositions differ. The mixtures of the mulled wines are
    $G_{1}={\begin{pmatrix}1\\2\\11\\2\end{pmatrix}},\,G_{2}={\begin{pmatrix}2\\2\\12\\3\end{pmatrix}},\,G_{3}={\begin{pmatrix}3\\1\\20\\7\end{pmatrix}}.$
Every mulled wine is represented by a four-tuple, where the entries represent the respective shares of the ingredients. The set of all (possible) mulled wines form a vector space (we will introduce this concept in the next lecture) and the three concrete mulled wines are vectors in this space.
Now suppose that none of the three mulled wines meets exactly our taste, in fact the wanted mulled wine has the mixture
    $W={\begin{pmatrix}1\\2\\20\\5\end{pmatrix}}\,.$
Is there a possibility to get the wanted mulled wine, by pouring together the given mulled wines in some way? Are there numbers $a,b,c\in \mathbb {Q}$ such that
    $a{\begin{pmatrix}1\\2\\11\\2\end{pmatrix}}+b{\begin{pmatrix}2\\2\\12\\3\end{pmatrix}}+c{\begin{pmatrix}3\\1\\20\\7\end{pmatrix}}={\begin{pmatrix}1\\2\\20\\5\end{pmatrix}}\,$
holds? This vector-equation can be expressed by four equations in the "variables“ $a,b,c$, where the equations come from the rows. When does there exist a solution, when none, when many? These are typical questions of linear algebra.

## Example

Suppose that two planes are given in $\mathbb {R} ^{3}$,
    $E={\left\{(x,y,z)\in \mathbb {R} ^{3}\mid 4x-2y-3z=5\right\}}\,$
and
    $F={\left\{(x,y,z)\in \mathbb {R} ^{3}\mid 3x-5y+2z=1\right\}}\,.$
How can we describe the intersecting line $G=E\cap F$? A point $P=(x,y,z)$ belongs to the intersection line if and only if it satisfies both plane equations. Therefore, both equations,
    $4x-2y-3z=5\,\,{\text{ and }}\,\,3x-5y+2z=1,$
must hold. We multiply the first equation by $3$, and subtract from that four times the second equation, and get
    $14y-17z=11\,.$
If we set $y=0$, then $z=-{\frac {11}{17}}$ and $x={\frac {13}{17}}$ must hold. This means that the point $P=\left({\frac {13}{17}},\,0,\,-{\frac {11}{17}}\right)$ belongs to $G$. In the same way, setting $z=0$, we find the point $Q=\left({\frac {23}{14}},\,{\frac {11}{14}},\,0\right)$. Therefore, the intersecting line is the line connecting these points, so
    $G={\left\{\left({\frac {13}{17}},\,0,\,-{\frac {11}{17}}\right)+t\left({\frac {209}{238}},\,{\frac {11}{14}},\,{\frac {11}{17}}\right)\mid t\in \mathbb {R} \right\}}\,.$

## Example

An electrical network consists of several connected wires, which we call the edges of the network in this context. In every edge $K_{j}$, there is a certain (depending on the material and the length of the edge) resistance $R_{j}$. The points $P_{n}$, where the edges meet, are called the vertices of the network. If we put to some edges of the network a certain electric tension (voltage), then we will have in every edge a certain current $I_{j}$. It is helpful to assign to each edge a fixed direction, in order to distinguish the direction of the current in this edge (if the current is in the opposite direction, it gets a minus sign). We call these directed edges. In every vertex of the network, the currents of the adjacent edges come together, their sum must be $0$. In an edge $K_{j}$, there is a voltage drop $U_{j}$, determined by Ohm's law to be
    $U_{j}=R_{j}\cdot I_{j}\,.$
We call a closed directed alignment of edges in a network a mesh. For such a mesh, the sum of voltages is $0$, unless from "outside“ a certain voltage is enforced.
We list these Kirchhoff's laws again.
* In every vertex, the sum of the currents equal $0$.
* In every mesh, the sum of the voltages equals $0$.
* If in a mesh, a voltage $V$ is enforced, then the sum of the voltages equals $V$.
Due to "physical reasons“, we expect that, given voltages in every edge, there should be a well-defined current in every edge. In fact, these currents can be computed, if we translate the stated laws into a system of linear equations and solve this system.
In the example given by the picture, suppose that the edges $K_{1},\ldots ,K_{5}$ (with the resistances $R_{1},\ldots ,R_{5}$) are directed from left to right, and that the connecting edge $K_{0}$ from $A$ to $C$ (where the voltage $V$ is applied) is directed upwards. The four vertices and the three meshes $(A,D,B),\,(D,B,C)$ and $(A,D,C)$ yield the system of linear equations
    ${\begin{matrix}I_{0}&+I_{1}&&-I_{3}&&&=&0\\&&&I_{3}&+I_{4}&+I_{5}&=&0\\-I_{0}&&+I_{2}&&-I_{4}&&=&0\\&-I_{1}&-I_{2}&&&-I_{5}&=&0\\&R_{1}I_{1}&&+R_{3}I_{3}&&-R_{5}I_{5}&=&0\\&&-R_{2}I_{2}&&-R_{4}I_{4}&+R_{5}I_{5}&=&0\\&-R_{1}I_{1}&+R_{2}I_{2}&&&&=&-V\,.\end{matrix}}$
Here the $R_{j}$ and $V$ are given numbers, and the $I_{j}$ are the unknowns we are looking for.
We give now the definition of a homogeneous and of an inhomogeneous system of linear equations over a field, for a given set of variables.

## Definition

Let $K$ denote a field, and let $a_{ij}\in K$ for $1\leq i\leq m$ and $1\leq j\leq n$. We call
    ${\begin{matrix}a_{11}x_{1}+a_{12}x_{2}+\cdots +a_{1n}x_{n}&=&0\\a_{21}x_{1}+a_{22}x_{2}+\cdots +a_{2n}x_{n}&=&0\\\vdots &\vdots &\vdots \\a_{m1}x_{1}+a_{m2}x_{2}+\cdots +a_{mn}x_{n}&=&0\end{matrix}}$
a (homogeneous) system of linear equations in the variables $x_{1},\ldots ,x_{n}$. A tuple $(\xi _{1},\ldots ,\xi _{n})\in K^{n}$ is called a solution of the linear system, if $\sum _{j=1}^{n}a_{ij}\xi _{j}=0$ holds for all $i=1,\ldots ,m$.
If $(c_{1},\ldots ,c_{m})\in K^{m}$ is given, then
    ${\begin{matrix}a_{11}x_{1}+a_{12}x_{2}+\cdots +a_{1n}x_{n}&=&c_{1}\\a_{21}x_{1}+a_{22}x_{2}+\cdots +a_{2n}x_{n}&=&c_{2}\\\vdots &\vdots &\vdots \\a_{m1}x_{1}+a_{m2}x_{2}+\cdots +a_{mn}x_{n}&=&c_{m}\end{matrix}}$
is called an inhomogeneous system of linear equations. A tuple $(\zeta _{1},\ldots ,\zeta _{n})\in K^{n}$ is called a solution to the inhomogeneous linear system, if $\sum _{j=1}^{n}a_{ij}\zeta _{j}=c_{i}$
$i$
The set of all solutions of the system is called the solution set. In the homogeneous case, this is also called the solution space, as it is indeed by Lemma 22.14
a vector space.
A homogeneous system of linear equations has always the so-called trivial solution $0=(0,\ldots ,0)$. An inhomogeneous system does not necessarily have a solution. For a given inhomogeneous linear system of equations, the homogeneous system which arises when we replace the vector on the right-hand side by the null vector $0$, is called the corresponding homogeneous system.
The following situation describes a more abstract version of Example 21.1 .

## Example

Let $K$ denote a field and $m\in \mathbb {N}$. Suppose that in $K^{m}$, there are $n$ vectors (or $m$-tuples)
    $v_{1}={\begin{pmatrix}a_{11}\\a_{21}\\\vdots \\a_{m1}\end{pmatrix}},\,v_{2}={\begin{pmatrix}a_{12}\\a_{22}\\\vdots \\a_{m2}\end{pmatrix}},\ldots ,v_{n}={\begin{pmatrix}a_{1n}\\a_{2n}\\\vdots \\a_{mn}\end{pmatrix}}$
given. Let
    $w={\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{m}\end{pmatrix}}\,$
be another vector. We want to know whether $w$ can be written as a linear combination of the $v_{j}$. Thus, we are dealing with the question whether there are $n$ elements $s_{1},\ldots ,s_{n}\in K$, such that
    $s_{1}{\begin{pmatrix}a_{11}\\a_{21}\\\vdots \\a_{m1}\end{pmatrix}}+s_{2}{\begin{pmatrix}a_{12}\\a_{22}\\\vdots \\a_{m2}\end{pmatrix}}+\cdots +s_{n}{\begin{pmatrix}a_{1n}\\a_{2n}\\\vdots \\a_{mn}\end{pmatrix}}={\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{m}\end{pmatrix}}\,$
holds. This equality of vectors means identity in every component, so that this condition yields a system of linear equations
    ${\begin{matrix}a_{11}s_{1}+a_{12}s_{2}+\cdots +a_{1n}s_{n}&=&c_{1}\\a_{21}s_{1}+a_{22}s_{2}+\cdots +a_{2n}s_{n}&=&c_{2}\\\vdots &\vdots &\vdots \\a_{m1}s_{1}+a_{m2}s_{2}+\cdots +a_{mn}s_{n}&=&c_{m}.\end{matrix}}$
    Solving linear systems
Systems of linear equations are best solved by the elimination method, where successively a variable gets eliminated, and in the end we get an equivalent simple system which can be solved directly (or read of that there is no solution). For small systems, also the substitution method or the equating method are useful.

## Definition

Let $K$ denote a field, and let two (inhomogeneous) systems of linear equations,

## Lemma

Let $K$ be a field, and let
    ${\begin{matrix}a_{11}x_{1}+a_{12}x_{2}+\cdots +a_{1n}x_{n}&=&c_{1}\\a_{21}x_{1}+a_{22}x_{2}+\cdots +a_{2n}x_{n}&=&c_{2}\\\vdots &\vdots &\vdots \\a_{m1}x_{1}+a_{m2}x_{2}+\cdots +a_{mn}x_{n}&=&c_{m}\end{matrix}}$
be an inhomogeneous system of linear equations over $K$. Then the following manipulations on this system yield an equivalent system.
* Exchanging two equations.
* The multiplication of an equation by a scalar $s\neq 0$.
* The omitting of an equation, if it occurs twice.
* The duplication of an equation (in the sense to write down the equation again).
* The omitting or adding of a zero row (zero equation).
* The replacement of an equation $H$ by the equation which arises if we add to $H$ another equation $G$ of the system.

### Proof

Most of the statements are immediately clear. (2) follows from the fact that if
    $\sum _{i=1}^{n}a_{i}\xi _{i}=c\,$
holds, then also
    $\sum _{i=1}^{n}(sa_{i})\xi _{i}=sc\,$
holds for every $s\in K$. If $s\neq 0$, then this implication can be reversed by multiplication with $s^{-1}$.
(6). Let $G$ be the equation
    $\sum _{i=1}^{n}a_{i}x_{i}=c\,,$
and $H$ be the equation
    $\sum _{i=1}^{n}b_{i}x_{i}=d\,.$
If a tuple $(\xi _{1},\ldots ,\xi _{n})\in K^{n}$ satisfies both equations, then it also satisfies the equation $H'=G+H$. And if the tuple satisfies the equations $G$ and $H'$, then it also satisfies the equation $G$ and $H=H'-G$.
$\Box$
For finding the solution of a linear system, the manipulations (2) and (6) are most important, where in general these two steps are combined, and the equation $H$ is replaced by an equation of the form $H+\lambda G$ (with $G\neq H$). Here, $\lambda \in K$ has to be chosen is such a way that the new equation contains one variable less than the old equation. This process is called elimination of a Variable. This elimination is not only applied to one equation, but for all equations except one (suitable chosen) "working row“ $G$, and with a fixed "working variable“. The following elimination lemma describes this step.

## Lemma

Let $K$ denote a field, and let $S$ denote an (inhomogeneous) system of linear equations $K$ in the variables $x_{1},\ldots ,x_{n}$. Suppose that $x$ is a variable which occurs in at least one equation $G$ with a coefficient $a\neq 0$. Then every equation $H$, different from $G$, can be replaced by an equation $H'$ in which $x$ does not occur any more, and such that the new system of equations $S'$, which consists of $G$ and the equations $H'$, is equivalent with the system $S$.

### Proof

Changing the numbering, we may assume $x=x_{1}$. Let $G$ be the equation
    $ax_{1}+\sum _{i=2}^{n}a_{i}x_{i}=b\,$
(with $a\neq 0$), and $H$ be the equation
    $cx_{1}+\sum _{i=2}^{n}c_{i}x_{i}=d\,.$
Then the equation
    $H'=H-{\frac {c}{a}}G\,$
has the form
    $\sum _{i=2}^{n}{\left(c_{i}-{\frac {c}{a}}a_{i}\right)}x_{i}=d-{\frac {c}{a}}b\,,$
and $x_{1}$ does not occur in it. Because of $H=H'+{\frac {c}{a}}G$, the systems are equivalent.
$\Box$

## Theorem

Every (inhomogeneous) system of linear equations over a field $K$ can be transformed, by the manipulations described in Lemma 21.7 , to an equivalent linear system of the form
    ${\begin{matrix}b_{1s_{1}}x_{s_{1}}&+b_{1s_{1}+1}x_{s_{1}+1}&\ldots &\ldots &\ldots &\ldots &\ldots &+b_{1n}x_{n}&=&d_{1}\\0&\ldots &0&b_{2s_{2}}x_{s_{2}}&\ldots &\ldots &\ldots &+b_{2n}x_{n}&=&d_{2}\\\vdots &\ddots &\ddots &\vdots &\vdots &\vdots &\vdots &\vdots &=&\vdots \\0&\ldots &\ldots &\ldots &0&b_{m{s_{m}}}x_{s_{m}}&\ldots &+b_{mn}x_{n}&=&d_{m}\\(0&\ldots &\ldots &\ldots &\ldots &\ldots &\ldots &0&=&d_{m+1}),\end{matrix}}$
where in each row, the first coefficient $b_{1s_{1}},b_{2s_{2}},\ldots ,b_{ms_{m}}$ is different from $0$. Here, either $d_{m+1}=0$, and the last row can be omitted, or $d_{m+1}=0$,

### Proof

This follows directly from the elimination lemma, by eliminating successively variables. Elimination is applied firstly to the first variable (in the given ordering), say $x_{s_{1}}$, which occurs at all in at least one equation with a coefficient $\neq 0$ (if it only occurs in one equation, then this elimination step is already done). This elimination process is applied as long as the new subsystem (without the working equation used in the elimination step before) has at least one equation with a coefficient for one variable different from $0$. After this, we have in the end only equations without variables, and they are either only zero equations, or there is no solution.
$\Box$

## Lemma

Let an inhomogeneous system of linear equations in triangular form
    ${\begin{matrix}a_{11}x_{1}&+a_{12}x_{2}&\ldots &+a_{1m}x_{m}&\ldots &+a_{1n}x_{n}&=&c_{1}\\0&a_{22}x_{2}&\ldots &\ldots &\ldots &+a_{2n}x_{n}&=&c_{2}\\\vdots &\ddots &\ddots &\vdots &\vdots &\vdots &=&\vdots \\0&\ldots &0&a_{mm}x_{m}&\ldots &+a_{mn}x_{n}&=&c_{m}\\\end{matrix}}$
with $m\leq n$ over a field $K$ be given, where the diagonal elements are all not $0$. Then the solutions $(x_{1},\ldots ,x_{m},x_{m+1},\ldots ,x_{n})$ are in bijection with the tuples $(x_{m+1},\ldots ,x_{n})\in K^{n-m}$.
$n-m$
$x_{m+1},\ldots ,x_{n}$

### Proof

This is clear, as when the tuple $(x_{m+1},\ldots ,x_{n})$ is given, the rows are determined successively from bottom to top.
$\Box$
For $m=n$, there are no free variables, and the linear system has exactly one solution.

## Example

We want to solve the inhomogeneous linear system
    ${\begin{matrix}2x&+5y&+2z&&-v&=&3\\3x&-4y&&+u&+2v&=&1\\4x&&-2z&+2u&&=&7\,\end{matrix}}$
over $\mathbb {R}$ (or over $\mathbb {Q}$). Firstly, we eliminate $x$ by keeping the first row $I$, replacing the second row $II$ by $II-{\frac {3}{2}}I$, and replacing the third row $III$ by $III-2I$. This yields
    ${\begin{matrix}2x&+5y&+2z&&-v&=&3\\&-{\frac {23}{2}}y&-3z&+u&+{\frac {7}{2}}v&=&{\frac {-7}{2}}\\&-10y&-6z&+2u&+2v&=&1\,.\end{matrix}}$
Now, we can eliminate $y$ from the (new) third row, with the help of the second row. Because of the fractions, we rather eliminate $z$ (which eliminates also $u$). We leave the first and the second row as they are, and we replace the third row $III$ by $III-2II$. This yields the system, in a new ordering of the variables,
    ${\begin{matrix}2x&+2z&&+5y&-v&=&3\\&-3z&+u&-{\frac {23}{2}}y&+{\frac {7}{2}}v&=&{\frac {-7}{2}}\\&&&13y&-5v&=&8\,.\end{matrix}}$
Now we can choose an arbitrary (free) value for $v$. The third row determines then $y$ uniquely, we must have
    $y={\frac {8}{13}}+{\frac {5}{13}}v\,.$
In the second equation, we can choose $u$ arbitrarily, this determines $z$ via
    ${\begin{aligned}z&=-{\frac {1}{3}}{\left(-{\frac {7}{2}}-u-{\frac {7}{2}}v+{\frac {23}{2}}{\left({\frac {8}{13}}+{\frac {5}{13}}v\right)}\right)}\\&=-{\frac {1}{3}}{\left(-{\frac {7}{2}}-u-{\frac {7}{2}}v+{\frac {92}{13}}+{\frac {115}{26}}v\right)}\\&=-{\frac {1}{3}}{\left({\frac {93}{26}}-u+{\frac {12}{13}}v\right)}\\&=-{\frac {31}{26}}+{\frac {1}{3}}u-{\frac {4}{13}}v.\end{aligned}}$
The first row determines $x$, namely
    ${\begin{aligned}x&={\frac {1}{2}}{\left(3-2z-5y+v\right)}\\&={\frac {1}{2}}{\left(3-2{\left(-{\frac {31}{26}}+{\frac {1}{3}}u-{\frac {4}{13}}v\right)}-5{\left({\frac {8}{13}}+{\frac {5}{13}}v\right)}+v\right)}\\&={\frac {1}{2}}{\left({\frac {30}{13}}-{\frac {2}{3}}u-{\frac {4}{13}}v\right)}\\&={\frac {15}{13}}-{\frac {1}{3}}u-{\frac {2}{13}}v.\end{aligned}}$
Hence, the solution set is
    ${\left\{{\left({\frac {15}{13}}-{\frac {1}{3}}u-{\frac {2}{13}}v,{\frac {8}{13}}+{\frac {5}{13}}v,-{\frac {31}{26}}+{\frac {1}{3}}u-{\frac {4}{13}}v,u,v\right)}\mid u,v\in \mathbb {R} \right\}}.$
A particularly simple solution is obtained by equating the free variables $u$ and $v$ with $0$. This yields the special solution
    $(x,y,z,u,v)=\left({\frac {15}{13}},\,{\frac {8}{13}},\,-{\frac {31}{26}},\,0,\,0\right)\,.$
The general solution set can also be written as
    ${\left\{{\left({\frac {15}{13}},{\frac {8}{13}},-{\frac {31}{26}},0,0\right)}+u{\left(-{\frac {1}{3}},0,{\frac {1}{3}},1,0\right)}+v{\left(-{\frac {2}{13}},{\frac {5}{13}},-{\frac {4}{13}},0,1\right)}\mid u,v\in \mathbb {R} \right\}}.$
Here,
    ${\left\{u{\left(-{\frac {1}{3}},0,{\frac {1}{3}},1,0\right)}+v{\left(-{\frac {2}{13}},{\frac {5}{13}},-{\frac {4}{13}},0,1\right)}\mid u,v\in \mathbb {R} \right\}}$
is a description of the general solution of the corresponding homogeneous linear system.

## Remark

A system of linear inequalities over the rational numbers or over the real numbers is a system of the form
    ${\begin{matrix}_{11}x_{1}+_{12}x_{2}+\cdots +_{1n}x_{n}&\star &c_{1}\\_{21}x_{1}+_{22}x_{2}+\cdots +_{2n}x_{n}&\star &c_{2}\\\vdots &\vdots &\vdots \\_{m1}x_{1}+_{m2}x_{2}+\cdots +_{mn}x_{n}&\star &c_{m}\,,\end{matrix}}$
where $\star$ might be $\leq$ or $\geq$. It is considerably more difficult to find the solution set of such a system than in the case of equations. In general, it is not possible to eliminate the variables.
    Footnotes
* ↑ In this example, only positive numbers have a practical interpretation. In linear algebra, everything is over a field, so we allow also negative numbers.
* ↑ Right here, we do not discuss that such equations define a plane. The solution sets are "shifted linear subspaces of dimension two“.
* ↑ Such a vector is sometimes called a disturbance vector of the system.
* ↑ It is enough that these equations have a different index in the system.
* ↑ Such a reordering is safe as long as we keep the names of the variables. But if we write down the system in matrix notation without the variables, then one has to be careful and remember the reordering of the columns.