6. For each of the following matrices $A \in M_{n \times n}$, test $A$ for diagonalizability and then find $e^A$

$$(a)(10\%) \ A = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \qquad (b)(15\%) \ A = \begin{bmatrix} 3 & 1 & 1 \\ 2 & 4 & 2 \\ -1 & -1 & 1 \end{bmatrix}.$$