# Finding a basis satisfying a property of an inner product

I have a vector space over $\mathbb{R}$ spanned by $\begin{pmatrix}1 & 0 \\ 0 & -1 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}, \begin{pmatrix} 0 & i \\ i & 0 \end{pmatrix}$, call those $Y_1, Y_2, Y_3$ respectively. I want to find a basis for this space relative to which the inner product $\langle X,Y\rangle=\frac{1}{2}\mathrm{Tr}\: (XY)$ has matrix $n=\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix}$. I don't see how it is at all possible, matrix of an inner product relative to the basis will look like $$\begin{pmatrix} \langle Y_1, Y_1 \rangle & \langle Y_1, Y_2 \rangle& \langle Y_1, Y_3 \rangle \\ \langle Y_2, Y_1 \rangle & \langle Y_2, Y_2 \rangle & \langle Y_2, Y_3 \rangle \\ \langle Y_3, Y_1 \rangle & \langle Y_3, Y_2 \rangle & \langle Y_3, Y_3 \rangle \end{pmatrix}$$ which implies that $\langle Y_3,Y_3\rangle=-1$, but the inner product is always nonnegative, what am I doing wrong here?

-

An element of your vector space $V$ has the form $$a Y_1 + b Y_2 + c Y_3 = \begin{bmatrix} a & b + c i\\ -b + c i & -a \end{bmatrix} = \begin{bmatrix} a & z\\ - \bar z & -a \end{bmatrix},$$ with $a,b,c$ real, and $z = b + c i$.
Write $z_k = b_k + c_k i$, for $k = 1, 2$. Then $$\begin{bmatrix} a_1 & z_1\\ - \bar z_1 & -a_1 \end{bmatrix} \cdot \begin{bmatrix} a_2 & z_2\\ - \bar z_2 & -a_2 \end{bmatrix} = \begin{bmatrix} a_1 a_2 -z_1 \bar z_2 & \dots\\ \dots & a_1 a_2 - \bar z_1 z_2 \end{bmatrix}$$ whose half-trace is $$a_1 a_2 - b_1 b_2 - c_1 c_2.$$
But then Sylvester's law of inertia should tell you that since you get in the form $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$ with respect to the given basis, then you cannot get it in the form $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{bmatrix}.$$