Prove that the set S is an orthogonal set Let $V=\left\{\left[\begin{array}{ll}a & b \\ c & d\end{array}\right]: a, b, c, d \in \mathbb{R}\right\}$ be the vector space of $2 \times 2$ real matrices endowed with the inner product
$$
\langle A, B\rangle=\operatorname{tr}\left(A^{T} B\right)
$$
for any $2 \times 2$ real matrices $A$ and $B .$ Let $S=\left\{\left[\begin{array}{cc}1 & 1 \\ -1 & -1\end{array}\right],\left[\begin{array}{cc}1 & -1 \\ -1 & 1\end{array}\right],\left[\begin{array}{cc}1 & -1 \\ 1 & -1\end{array}\right]\right\} .$
Prove that S is an orthogonal set and check if S is an orthonormal set.
Find an orthogonal basis for V containing Set S
I planned on using Gram-Schmidt process but I am stuck with the first step as I checked if the Set S is a basis by checking if the matrices are linearly independent.
$A=\left[\begin{array}{cccc}1 & 1 & 1 & 0 \\ 1 & -1 & -1 & 0 \\ -1 & -1 & -1 & 0 \\ -1 & 1 & -1 & 0\end{array}\right]$
$\operatorname{rref}(A)=\left[\begin{array}{llll}1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0\end{array}\right]$
Which shows that the matrices are linearly dependent and can't be the basis. If it so, How can I make it such that the Set S can be a basis should I remove a one of the matrices or add? Any help would be appreciated. Thank you.
 A: There is no need for them to be a basis (though they are not, in fact, linearly dependent - I have no idea where that matrix $A$ came from, but it's not relevant - in particular, we have only three vectors). We just want to show that they are orthogonal. That is: we wish to show that, for any $A, B \in S$, we have $\langle A,B\rangle = 0$.
So, let's check that. We have
\begin{align*}\left\langle\begin{bmatrix}1 & 1 \\ -1 & -1\end{bmatrix},\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\right\rangle &= \mathbf{tr}\begin{bmatrix}1&1\\-1 & -1\end{bmatrix}^T\begin{bmatrix}1&-1\\-1&1\end{bmatrix} \\&=\mathbf{tr}\begin{bmatrix}1 & -1 \\ 1 & -1\end{bmatrix}\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\\&=\mathbf{tr}\begin{bmatrix}2&-2\\2&-2\end{bmatrix}\\&= 0,\end{align*}
and similarly for the other pairs.
To check if it's orthonormal, you then need only check that each element is normal. For example, we have
\begin{align*}\left\langle\begin{bmatrix}1&1\\-1&-1\end{bmatrix},\begin{bmatrix}1&1\\-1&-1\end{bmatrix}\right\rangle &= \mathbf{tr}\begin{bmatrix}1 & -1\\1 & -1\end{bmatrix}\begin{bmatrix}1&1\\-1&-1\end{bmatrix}\\&=\mathbf{tr}\begin{bmatrix}2 &2 \\2 &2\end{bmatrix}\\&= 4\\&\neq 1\end{align*}
To extend to an orthogonal basis, you can first extend to any spanning set, say by appending $$\begin{bmatrix}1&0\\0&0\end{bmatrix},\begin{bmatrix}0&1\\0&0\end{bmatrix},\begin{bmatrix}0&0\\1&0\end{bmatrix},\begin{bmatrix}0&0\\0&1\end{bmatrix}$$ to the end, then sift that down to a basis (which will consist of $S$ plus exactly one of those four matrices, call whichever matrix it is $X$, and finally orthogonalise by replacing $X$ by $$X - \mathbf{proj}\left(X,\begin{bmatrix}1&1\\-1&-1\end{bmatrix}\right) - \mathbf{proj}\left(X,\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\right) - \mathbf{proj}\left(X,\begin{bmatrix}1&-1\\1&-1\end{bmatrix}\right)$$
where $$\mathbf{proj}(A,B) = \dfrac{\langle A,B\rangle}{\langle B,B\rangle}B$$
