This is a given Bilinear form (of Matrix) :
$$B(X,Y)=\operatorname{tr}(XY)$$
I need to find a base in case of $n=2$ (matrix size is $2\times 2$) that the form B-form is represented by Diagonal matrix.
I think the base can be found with Gram–Schmidt process, but I don't know how to solve it.
Please help me with that, Thanks.
$$B\left(\pmatrix{x_1&x_2\\x_3&x_4},\pmatrix{y_1&y_2\\y_3&y_4}\right)=x_1y_1+x_2y_3+x_3y_2+x_4y_4$$ A basis of $2\times 2$ matrices is given by $e_1:=\pmatrix{1&0\\0&0}$, $e_2:=\pmatrix{0&1\\0&0}$, $e_3:=\pmatrix{0&0\\1&0}$, $e_4:=\pmatrix{0&0\\0&1}$.
Then you can try to apply the Gram-Schmidt process. Calculate $B(e_i,e_j)$ and then $f_1:=e_1$ (its $B$-norm is already $1$), then $$f_2:=e_2-B(f_1,e_2)f_1$$ and so on..