Straightforward, logical techniques for solving matrices? I'm studying for a Linear Algebra exam, and having difficulty with solving matrices in a timely manner. Our professor provided us with several sample exams to practice with, which begin with a matrix (generally 3x4 augmented) that needs to be solved for unique, infinite, and no solutions. To make things trickier, the matrices generally contain at least one variable placed in ways that deliberately resist solving, like:
$$
A = \left[\begin{array}{rrr|r}
1 & 1 & a & -1 \\
3 & (a+1) & (a-1) &-1\\
a&2&1&0 
\end{array}\right]
$$ or $$
A= \left[\begin{array}{rrr|r}
1 & -2 & 0 & 1 \\
1 & -1 & \lambda &2\\
0 & \lambda & 9 & \mu 
\end{array}\right] 
$$
We're supposed to solve these through Gaussian Elimination, which as I understand it is doing different matrix transformations over and over until you happen across a solution. That sort of experimentation takes a ton of time, but it seems awfully random for math. Is there a linear progression to take when solving matrices, or any analysis / tests to check prior that can speed up the process?
Failing that, does anyone have any tips they think might help? Any help would be immensely appreciated. Thanks!
 A: Performing gaussian elimination on a matrix is an algorithmic procedure which you should be able to apply to any matrix without "thinking" too much. Namely, you shouldn't apply random row operations, but you should apply them in a specific way that is guaranteed to lead to a simple system from which the solutions can be read immediately. When there are parameters involved, one should postpone using the parameters to eliminate rows as long as possible in order to not handle different cases (something is zero, something is not zero). Let me demonstrate this on your first matrix:


*

*The first thing to do is to perform a row operation which makes the $(1,1)$ entry of the matrix non-zero (and preferably, not a parameter). That is, switch the first row with some other row to make the $(1,1)$-entry non-zero. If all the entries in the first column are zero, this is not possible and you move to the next column. If there are parameters and constants, make the $(1,1)$ entry constant. For the first matrix, this is already the case.

*The next step is to perform row operations that will make all the other entries in the first row zero. In our case,
$$ \left[\begin{array}{rrr|r}
1 & 1 & a & -1 \\
3 & (a+1) & (a-1) &-1\\
a&2&1&0 
\end{array}\right] \xrightarrow{R_2 = R_2 - 3R_1, R_3 = R_3 - aR_1}
\left[\begin{array}{rrr|r}
1 & 1 & a & -1 \\
0 & (a-2) & (-2a-1) &0 \\
0 & 2 - a & 1 - a^2 & a 
\end{array}\right].
$$

*At this point, we move to the second column. By performing a row switching operation between the second row and some $i$-th row when $i > 2$, we can try and make the $(2,2)$-entry of the matrix non-zero (and if possible, a constant). If this is not possible, we move to the third column. In our case, the $(2,2)$-entry is $a - 2$ which is a parameter and we can't switch it with a row that has a non-parameter entry so we leave it.

*Next, we use the $(2,2)$-entry to cancel all the $(i,2)$-entries for $i > 2$. In our case,
$$ \left[\begin{array}{rrr|r}
1 & 1 & a & -1 \\
0 & (a-2) & (-2a-1) &0 \\
0 & 2 - a & 1 - a^2 & a 
\end{array}\right] \xrightarrow{R_3 = R_3 + R_2}
\left[\begin{array}{rrr|r}
1 & 1 & a & -1 \\
0 & (a-2) & (-2a-1) &0 \\
0 & 0 & - a^2 - 2a & a \end{array}\right]. $$


That's it. The final $3 \times 3$ part of the augmented system is upper triangular. The equivalent system we got is
$$ x_1 + x_2 + a x_3 = -1, \\
(a-2)x_2 - (2a + 1)x_3 = 0, \\
-(a^2 + 2a)x_3 = a. $$
When does this system has a solution? Start with the last equation which has the simplest form. If $a^2 + 2a \neq 0$ then $x_3 = -\frac{a}{a^2 + 2a}$ so there is a unique value of $x_3$ which satisfies the equation. If $a = 0$ then we get the equation $0 \cdot x_3 = 0$ which has infinitely many solutions. If $a = 2$ then we get the equation $0 \cdot x_3 = 2$ which has no solutions. Now we perform back substitution. Given $x_3$, we see that the second equation has a unique solution if $a \neq 2$ and we don't need to bother about the case $a = 2$ because the third equation cannot be solved. Finally, we move to the first equation in which we see that given $x_3,x_2$ we see that $x_1$ is determined uniquely. Let us summarize:


*

*If $a = 0$ then there are infinitely many solutions (the dimension of the space of solutions will be one).

*If $a = 2$ then there are no solutions.

*If $a \neq 0,2$ then the system will have a unique solution.


It takes some practice but after a few exercises of this sort you'll see that you will be able to do the operations quickly and in a systematic way. For practice, I suggest you try the approach above with the second matrix and post your results. I'll be happy to upvote and comment on your attempt.

For the second matrix, we have
$$ \left[\begin{array}{rrr|r}
1 & -2 & 0 & 1 \\
1 & -1 & \lambda &2\\
0 & \lambda & 9 & \mu 
\end{array}\right]  \xrightarrow{R_2 = R_2 - R_1} 
\left[\begin{array}{rrr|r}
1 & -2 & 0 & 1 \\
0 & 1 & \lambda & 1 \\
0 & \lambda & 9 & \mu 
\end{array}\right] \xrightarrow{R_3 = R_3 - \lambda R_1}
\left[\begin{array}{rrr|r}
1 & -2 & 0 & 1 \\
0 & 1 & \lambda & 1 \\
0 & 0 & 9 - \lambda^2 & \mu - \lambda
\end{array}\right].$$
This corresponds to the system of equations
$$ x_1 - 2x_2 = 1, \\
x_2 + \lambda x_3 = 1, \\
(9 - \lambda^2) x_3 = \mu - \lambda. $$
Start again from the last equation. If $9 - \lambda^2 \neq 0$ then $x_3$ is determined uniquely as $x_3 = \frac{\mu - \lambda}{9 - \lambda^2}$. If $9 = \lambda^2$ (so $\lambda = \pm 3$) the equation reads $0 \cdot x_3 = \mu - \lambda$. This equation has infinitely many solutions if $\mu = \lambda$ and no solutions otherwise. Moving to the second equation, we see that given $x_3$, $x_2$ is determined uniquely and given $x_3,x_2$ the first equation determines $x_1$ uniquely. Hence, we have three cases:


*

*If $\lambda \neq \pm 3$, the system has a unique solution.

*If $\lambda = \mu = 3$ or $\lambda = \mu = -3$ the system has infinitely many solutions (the dimension of the solution space is one).

*If $\lambda = 3$ but $\mu \neq 3$ or $\lambda = -3$ but $\mu \neq -3$ the system has no solutions.

