# Linear system/Examples/Introduction/Section

Firstly, we give three 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

${\displaystyle 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 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

${\displaystyle {}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[1] ${\displaystyle {}a,b,c\in \mathbb {Q} }$ such that

${\displaystyle {}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“ ${\displaystyle {}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 ${\displaystyle {}\mathbb {R} ^{3}}$,[2]

${\displaystyle {}E={\left\{(x,y,z)\in \mathbb {R} ^{3}\mid 4x-2y-3z=5\right\}}\,}$

and

${\displaystyle {}F={\left\{(x,y,z)\in \mathbb {R} ^{3}\mid 3x-5y+2z=1\right\}}\,.}$

How can we describe the intersecting line ${\displaystyle {}G=E\cap F}$? A point ${\displaystyle {}P=(x,y,z)}$ belongs to the intersection line if and only if it satisfies both plane equations. Therefore, both equations,

${\displaystyle 4x-2y-3z=5\,\,{\text{ and }}\,\,3x-5y+2z=1,}$

must hold. We multiply the first equation by ${\displaystyle {}3}$, and subtract from that four times the second equation, and get

${\displaystyle {}14y-17z=11\,.}$

If we set ${\displaystyle {}y=0}$, then ${\displaystyle {}z=-{\frac {11}{17}}}$ and ${\displaystyle {}x={\frac {13}{17}}}$ must hold. This means that the point ${\displaystyle {}P=\left({\frac {13}{17}},\,0,\,-{\frac {11}{17}}\right)}$ belongs to ${\displaystyle {}G}$. In the same way, setting ${\displaystyle {}z=0}$, we find the point ${\displaystyle {}Q=\left({\frac {23}{14}},\,{\frac {11}{14}},\,0\right)}$. Therefore, the intersecting line is the line connecting these points, so

${\displaystyle {}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 ${\displaystyle {}K_{j}}$, there is a certain (depending on the material and the length of the edge) resistance ${\displaystyle {}R_{j}}$. The points ${\displaystyle {}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 ${\displaystyle {}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 ${\displaystyle {}0}$. In an edge ${\displaystyle {}K_{j}}$, there is a voltage drop ${\displaystyle {}U_{j}}$, determined by Ohm's law to be

${\displaystyle {}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 ${\displaystyle {}0}$, unless from "outside“ a certain voltage is enforced.

We list these Kirchhoff's laws again.

1. In every vertex, the sum of the currents equal ${\displaystyle {}0}$.
2. In every mesh, the sum of the voltages equals ${\displaystyle {}0}$.
3. If in a mesh, a voltage ${\displaystyle {}V}$ is enforced, then the sum of the voltages equals ${\displaystyle {}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 ${\displaystyle {}K_{1},\ldots ,K_{5}}$ (with the resistances ${\displaystyle {}R_{1},\ldots ,R_{5}}$) are directed from left to right, and that the connecting edge ${\displaystyle {}K_{0}}$ from ${\displaystyle {}A}$ to ${\displaystyle {}C}$ (where the voltage ${\displaystyle {}V}$ is applied) is directed upwards. The four vertices and the three meshes ${\displaystyle {}(A,D,B),\,(D,B,C)}$ and ${\displaystyle {}(A,D,C)}$ yield the system of linear equations

${\displaystyle {\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 ${\displaystyle {}R_{j}}$ and ${\displaystyle {}V}$ are given numbers, and the ${\displaystyle {}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 ${\displaystyle {}K}$ denote a field, and let ${\displaystyle {}a_{ij}\in K}$ for ${\displaystyle {}1\leq i\leq m}$ and ${\displaystyle {}1\leq j\leq n}$. We call

${\displaystyle {\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 ${\displaystyle {}x_{1},\ldots ,x_{n}}$. A tuple ${\displaystyle {}(\xi _{1},\ldots ,\xi _{n})\in K^{n}}$ is called a solution of the linear system, if ${\displaystyle {}\sum _{j=1}^{n}a_{ij}\xi _{j}=0}$ holds for all ${\displaystyle {}i=1,\ldots ,m}$.

If ${\displaystyle {}(c_{1},\ldots ,c_{m})\in K^{m}}$ is given,[3] then

${\displaystyle {\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 ${\displaystyle {}(\zeta _{1},\ldots ,\zeta _{n})\in K^{n}}$ is called a solution to the inhomogeneous linear system, if ${\displaystyle {}\sum _{j=1}^{n}a_{ij}\zeta _{j}=c_{i}}$

holds for all ${\displaystyle {}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 fact a vector space.

A homogeneous system of linear equations has always the so-called trivial solution ${\displaystyle {}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 ${\displaystyle {}0}$, is called the corresponding homogeneous system.

The following situation describes a more abstract version of example.

## Example

Let ${\displaystyle {}K}$ denote a field and ${\displaystyle {}m\in \mathbb {N} }$. Suppose that in ${\displaystyle {}K^{m}}$, there are ${\displaystyle {}n}$ vectors (or ${\displaystyle {}m}$-tuples)

${\displaystyle 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

${\displaystyle {}w={\begin{pmatrix}c_{1}\\c_{2}\\\vdots \\c_{m}\end{pmatrix}}\,}$

be another vector. We want to know whether ${\displaystyle {}w}$ can be written as a linear combination of the ${\displaystyle {}v_{j}}$. Thus, we are dealing with the question whether there are ${\displaystyle {}n}$ elements ${\displaystyle {}s_{1},\ldots ,s_{n}\in K}$, such that

${\displaystyle {}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

${\displaystyle {\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}}}$
1. In this example, only positive numbers have a practical interpretation. In linear algebra, everything is over a field, so we allow also negative numbers.
2. Right here, we do not discuss that such equations define a plane. The solution sets are "shifted linear subspaces of dimension two“.
3. Such a vector is sometimes called a disturbance vector of the system.