# System of Linear Equations with dependence on $a$

I gotta solve this System of linear equations dependent on $a$:

$$x+y+z=1$$ $$-2x+2y+az=3$$ $$-ax+y+2z=2$$

I'm transforming this to a matrix.

$$M_1 = \left[\begin{array}{ccc|c} 1 & 1 & 1 & 1\\ -2 & 2 & a & 3\\ -a & 1 & 2 & 2 \end{array}\right]$$

I'm switching x with y column and sort.

$$M_2 = \left[\begin{array}{ccc|c} 1 & 1 & 1 &1\\ 1 & -a & 2 &3\\ 2 & -2 & a &2 \end{array}\right]$$

Solving this:

$$M_3 = \left[\begin{array}{ccc|c} 1 & 1 & 1&1\\ 0 & -a-1 & 1&2 \\ 0 & 0 & a+2 &5 \end{array}\right]$$

Therefore I'm getting $$a= 3$$

Putting it into the $M1$ yields no result, as I end up with.

$$M = \left[\begin{array}{ccc|c} 1 & 1 & 1 & 1\\ 0 & 4 & 5 & 1\\ 0 & 4 & 5 & 5 \end{array}\right]$$

Is there an error in my calculation?

• Careful, you want brackets ($[$ and $]$) for a matrix, vertical lines denote the determinant. – Michael Albanese Aug 25 '13 at 19:15
• okay, fixing it right now. thanks for the heads up :) – blacksmth Aug 25 '13 at 19:16
• Also, a $3\times 3$ matrix is not equal to a $3\times 1$ vector. You mean the $3\times 3$ matrix multiplied by the column vector $[x\, y\, z]^T$ is equal to a $3\times 1$ vector. – Michael Albanese Aug 25 '13 at 19:17
• Changed it. guess it is right now. But I don't know how to horizontal lines inside of matrices :d – blacksmth Aug 25 '13 at 19:33
• You shall solve it for values of x,y,z rather than finding out a because there can be n such a's that will satisfy this equation. – Sejwal Aug 25 '13 at 19:39

## 2 Answers

I have severely edited my original answer.

Your first error occurs when forming $M2$. You did a combination of swapping the second and third row (which you are allowed to do) with swapping the first and second column (which you are not allowed to do).

Each row of the matrices $M1$, $M2$, and $M3$ represents an equation in $x, y,$ and $z$. By swapping rows, you just change the order in which the equations are listed; this is perfectly find because it does not change the solutions to the system. Swapping rows however corresponds to interchanging variables; this is not allowed because it effects the solutions of the system. For example, the solutions of $x + 2y = 0$ are not the same as the solutions of $y + 2x = 0$.

Your next error occurs when forming $M3$. You have done the row reduction incorrectly.

Your final error occurs when you conclude that $a = 3$. The third row of $M3$ represents the equation $(a + 2)z = 5$. That does not imply that $a = 3$. However, by imposing a restriction on $a$, you can find $z$ in terms of $a$.

I advise you try again. Start with $M1$ (which is the correct augmented matrix for the system) and row reduce it, making sure to only use the allowed row operations.

• No, already the equation $(a+2)z=5$ is in error. Take $z=0$, $a=3$, $x=-1/4$ and $y=5/4$. This is a solution, contradicting $(a+2)z=5$. – Dietrich Burde Aug 25 '13 at 20:32
• I have severely edited my answer. I didn't realise that the mistake I initially pointed out was not the first one that was made. – Michael Albanese Aug 25 '13 at 21:02

you shall use Cramer rule and it will give you $\left\{\left\{x\to -\frac{5}{(a+2)^2},y\to -\frac{-a^2+a+1}{(a+2)^2},z\to \frac{5}{a+2}\right\}\right\}$. So its not about finding a but finding x,y,z. Now for all values of a you get correct result.

Edit: For example for $a=1$, ${{x = -(5/9), y = -(1/9), z = 5/3}}$, now all your equations will be satisfied.

• @DietrichBurde: you need to specify some value for a before substituting in equation. – Sejwal Aug 25 '13 at 20:19
• And your values $a=1, x=−(5/9),y=−(1/9),z=5/3$ do not satisfy the second and third equation. – Dietrich Burde Aug 25 '13 at 20:38
• x,y,z depend on a the unknown variable and substituting a determines $x,y,z$. Its not a random choice. Basically this example is showing that there are n such a's – Sejwal Aug 25 '13 at 20:39
• and for a=1 it is satisfying, it is generating 3 as required on RHS. Sorry gotta go to sleep..its 2:15 at night. Please post I will respond tomorrow. – Sejwal Aug 25 '13 at 20:41