Solve linear system of equations by RREF. 
Consider a Markov chain with transition matrix
$$P=\begin{bmatrix}1-a&a&0\\0&1-b&b\\c&0&1-c\end{bmatrix},$$
where $0<a,b,c<1.$ Find the stationary distribution.

This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $\vec{\pi} P=\vec{\pi}$ for $\vec{\pi}.$
I get the equations
$$\begin{align}(1-a)\pi_1+c\pi_3&=\pi_1\\
a\pi_1+(1-b)\pi_2 &= \pi_2\\
b\pi_2+(1-c)\pi_3&=\pi_3\\
\pi_1+\pi_2+\pi_3&=1\end{align}$$
ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get
\begin{align}-a\pi_1+c\pi_3&=0\\a\pi_1-b\pi_2&=0\\b\pi_2-c\pi_3&=0\\\pi_1+\pi_2+\pi_3&=1,\end{align}
adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.
 A: Notice that $\vec{\pi}P = \vec{\pi} \iff \vec{\pi}\left(P - I\right)= \vec{0}$ and evaluate $\vec{\pi}P$:
$
\begin{bmatrix}
\pi_1 & \pi_2 & \pi_3
\end{bmatrix}
\begin{bmatrix}
-a & a & 0\\
0 & -b & b\\
c & 0 & -c
\end{bmatrix}
=
\begin{bmatrix}
-a\pi_1 + c\pi_3 & a\pi_1 - b\pi_2 & b\pi_2 - c\pi_3
\end{bmatrix}
$.
Now use that $$\vec{\pi}\left(P - I\right)= \vec{0} \iff
\begin{bmatrix}
-a\pi_1 + c\pi_3\\ a\pi_1 - b\pi_2\\ b\pi_2 - c\pi_3
\end{bmatrix} = 
\begin{bmatrix}
0\\ 0\\ 0
\end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$\vec{\pi}\left(P - I\right)= \vec{0} \iff
\begin{bmatrix}
-a\pi_1 + c\pi_3\\ a\pi_1 - b\pi_2
\end{bmatrix} = 
\begin{bmatrix}
0\\ 0
\end{bmatrix}.$$
Next let's replace $\pi_3$, our free variable, with the more neutral variable $x$:
$$\begin{bmatrix}
-a\pi_1 + cx\\ a\pi_1 - b\pi_2
\end{bmatrix} = 
\begin{bmatrix}
0\\ 0
\end{bmatrix}.$$
Lastly, solve: $\pi_1 = \frac{c}{a}x$ and $\pi_2 = \frac{a}{b}\pi_1 = \frac{c}{b}x$. Thus, your general solution is
$$\vec{\pi} = x\begin{bmatrix}c/a & c/b & 1\end{bmatrix}.$$
A: Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = \begin{bmatrix}-a&0&c \\ a&-b&0 \\ 0&b&-c \end{bmatrix}.$$ Row-reducing this matrix results in $$\begin{bmatrix}1&0&-\frac ca\\0&1&-\frac cb \\ 0&0&0\end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $\vec\pi$, normalize this vector by dividing by the sum of its elements.
