0

I have something like this:

$2x + y = 160$

$x + 2y = 170$

$x + z = 95$

$z = 45$

$2z + y = 150$

I'm trying to use gauss elimination method, but exacly I've matrix form $5$ x $3$, where for example this algorihm using square matrix:

https://martin-thoma.com/solving-linear-equations-with-gaussian-elimination/

Zawada
  • 23

1 Answers1

0

Use the system

$\begin{cases}x+z = 95 \\ z=45 \\ 2z+y = 150 \end{cases}$

Then in order to solve it represent it as $Ax=b:$

$Ax = b \Rightarrow\begin{bmatrix}1&0&1 \\ 0&0&1 \\ 0&1&2\end{bmatrix}\cdot x = \begin{bmatrix}95\\45\\150\end{bmatrix}$

Then $x=50,y=60,z=45$.


As you have more equations than unknowns ($5$ equations vs $3$ unknowns) then you have to get rid of $2$ equations. This is called an overdetermined system of equations.

But first, you have to prove that there exists a lineal combination involving the coefficients of the $5x3$ matrix , this is done measuring the rank of the coefficient matrix and comparing it to the rank of the augmented matrix, which in your case both have rank $3$, satisfying Rouché–Capelli theorem

kub0x
  • 2,117
  • 1
  • 15
  • 25
  • Yes, here it is possible to use a square matrix. The OP also asks, however, what to do in general for a non-square matrix. – Dietrich Burde Feb 14 '17 at 12:20
  • @DietrichBurde: It is said that the system is Overdetermined, since it has more equations than unknowns. If the coefficients of the system are linearly independent (no linear combination), then the system doesn't have a solution. This can be proven with the rank. – kub0x Feb 14 '17 at 12:27
  • Yes, exactly. This is what I meant with "Solving non-square matrix equations", which is what the OP has asked. – Dietrich Burde Feb 14 '17 at 12:34
  • @DietrichBurde: I will update my answer to introduce the concept to the user as said in my comment. – kub0x Feb 14 '17 at 12:38