Question: Consider the space of $2 \times 2$ matrices equipped with the inner product: $\langle A , B \rangle = \operatorname{tr}(A^T B)$
i) Find an orthonormal basis for the subspace $V = \{M \in M_{2\times 2}|AM=MA\}$ where $$ A = \begin{bmatrix} -1 & 0 \\ 0 & 1 \\ \end{bmatrix}, \quad M = \begin{bmatrix} a & b \\ c & d \\ \end{bmatrix} $$
So $AM$ I got: $$ \begin{bmatrix} -a & -b \\ c & d \\ \end{bmatrix} $$
and $MA$ I got: $$ \begin{bmatrix} -a & b \\ -c & d \\ \end{bmatrix} $$ So equated this two, I get the following relationships: $-a= -a$, $b,c = 0$, and $d = d$ giving me a basis: $$ \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix} $$
and
$$ \begin{bmatrix} 0 & 0 \\ 0 & 1 \\ \end{bmatrix} $$
Did I do this question correctly or was I supposed to use the inner product to find the orthonormal basis? Can someone point out where I went wrong?
You have correctly found a basis for the subspace $V$.
Typically, you would use the basis that you found in order to get an orthonormal basis, using the Gram-Schmidt process for instance. However, in this case you "got lucky" in that your basis is already orthonormal. To complete your answer, all you need to do is state that your basis is orthonormal (relative to the inner product given).
In other words, it is important to say that the matrices $$ M_1 = \pmatrix{1&0\\0&0}, \qquad M_2 = \pmatrix{0&0\\0&1} $$ satisfy $\langle M_1,M_1\rangle = \langle M_2,M_2\rangle = 1$ and $\langle M_1,M_2 \rangle = 0$.