If $A=\begin {bmatrix} a & b \\ 0 & 1 \end{bmatrix}$, find $A^n$ for positive integer $n$ 
If $A=\begin {bmatrix} a & b \\ 0 & 1 \end{bmatrix}$, find $A^n$ for positive integer $n$.

Now my method of solving these were to take $n=1,2,3..$, find the respective value and analyse the options to find the right one. It works well, but I never quite figured out how to do this properly, in case options aren’t given. Thanks!

Another way if you're interesting. 
$A=B+C$ where $B=\begin {bmatrix} a & 0 \\ 0 & 1 \end{bmatrix}$ and $C=\begin {bmatrix} 0 & b \\ 0 & 0 \end{bmatrix}$
We have $B^n=\begin {bmatrix} a^n & 0 \\ 0 & 1 \end{bmatrix}$, $C^2=0$ and $BC=aCB=\begin {bmatrix} 0 & ab \\ 0 & 0 \end{bmatrix}$
So $A^n=(B+C)^n=B^n+\displaystyle\sum_{i=0}^{n-1}B^i C B^{n-1-i}$
We have $B^i C B^{n-1-i}=aB^{i-1}C B^{n-i}=\cdots=a^iCB^{n-1}=a^i \begin {bmatrix} 0 & b \\ 0 & 0 \end{bmatrix} $ so
$$A^n=B^n+\displaystyle\sum_{i=0}^{n-1}a^i C B^{n-1}=\begin {bmatrix} a^n & 0 \\ 0 & 1 \end{bmatrix}+\displaystyle\sum_{i=0}^{n-1}a^i \begin {bmatrix} 0 & b \\ 0 & 0 \end{bmatrix}=\begin {bmatrix} a^n & b\displaystyle\sum_{i=0}^{n-1}a^i \\ 0 & 1 \end{bmatrix}$$
If $a=1$ then $A^n=\begin {bmatrix} 1 & nb \\ 0 & 1 \end{bmatrix}$
If $a\neq 1$ then $A^n=\begin {bmatrix} a^n & b\frac{a^n-1}{a-1} \\ 0 & 1 \end{bmatrix}$
