If $k$ cannot equal $0$ and $A$ is as given below, what is $A$ inverse? $$
A = 
\pmatrix{
1 & 0 & 2k\\
0 & 1 & k\\
0 & 0 & k
}
$$
I don't know what method to use to solve this problem as I haven't encountered and variable before when solving for the inverse of a matrix. I've tried to use the identity method to solve it. It didn't seem right. I also, tried solving for each row and setting them equal to 0, this also didn't seem right. 

Hint: We can write the matrix as the product of elementary matrices:
$$
\begin{bmatrix}
1 & 0 & 2k \\
0 & 1 & k \\
0 & 0 & k \\
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 1 \\
0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & k \\
\end{bmatrix}.
$$
Perhaps you'll find it easier to find $$
\left(\begin{bmatrix}
1 & 0 & 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 1 \\
0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & k \\
\end{bmatrix}\right)^{-1}=
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & k \\
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 1 \\
0 & 0 & 1 \\
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 0 & 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}^{-1}.
$$
Their inverses are described on the linked wikipedia page.
