# Using Gram-Schmidt to orthogonalize Matrix Bases

$\newcommand\m[1]{\begin{pmatrix}#1\end{pmatrix}}$ I have the billinear form $f(A,B) = trace(A*B)$ on $V = Mat(2x2,R)$. If I just start from the standard basis of $V$ then I end up with my second matrix in the Gram-Schmidt process being $v_2$ Which is clearly not orthogonal. What am I doing wrong? $v_1 = \m{1&0\\0&0} \\ v_2 = \m{0&1\\0&0}-\frac{f(v_1,v_2)}{f(v_1,v_1)}*\m{1&0\\0&0} = \m{0&1\\0&0}$

• why aren't $v_1$ and $v_2$ orthogonal with respect to the given norm? – M. Van Aug 31 '17 at 8:12
• Because $f(v_2,v_2)$ = 0. – macco Aug 31 '17 at 8:13

Your bilinear form should be: $f(A,B)= \mbox{tr} \; A^T B = \sum_{i,j} a_{ij}b_{ij}$. Note that writing a 2 by 2 matrix as a 4-vector: $X_A=(a_{11}, a_{12},a_{21},a_{22})$ your (modified) bilinear form is simply the usual scalar product of $X_A$ with $X_B$. In your example, the standard matrix basis is in fact orthonormal for this scalar product.
• Your $*$ looks like a multiplication sign. For complex matrices that is fine with the adjoint operation and the same as applying transpose when matrices are real. Note that $f(v_2,v_2)= \mbox{tr} \; v_4= 1$ which is what you wanted. – H. H. Rugh Aug 31 '17 at 11:13
• Then it is wrong. It should be adjoint, $(A^*)_{ij} = \overline{A_{ji}}$ in order for this to define an inner product, so that for every non-zero $A$, $f(A,A)>0$. – H. H. Rugh Aug 31 '17 at 11:44