# Can all matrices be orthogonalized?

I helped a buddy of mine do some MATLAB homework where you had to orthogonalize a matrix via Gram-Schmidt. I wrote a test function called isorthog that returned true or false based on whether the (orthongonalized) matrix times its transpose was equal to the identity matrix of the same size. His professor told him that this check is unnecessary. I think it is, because sometimes it would test false.

Can all $n \times n$ matrices be orthogonalized?

If so, can someone provide a hint as to how to prove it? I DO NOT want a full solution just 1 or 2 pointers to help me get started. Thanks!

-
That depends on what exactly you mean by "orthogonalized". What would you want the orthogonalization of the zero matrix to be, for example? –  Henning Makholm Dec 11 '11 at 17:42
Crap, I feel stupid. The Wikipedia article on Gram-Schmidt suggests that only if the vectors are linearly independent does Gram-Schmidt work. Sorry for gumming up the works! –  Phillip Cloud Dec 11 '11 at 17:42

You cannot orthogonalize a matrix. It's vectors that are orthogonal or not.

I conjecture that you are in the following situation:

You are given $n$ (supposedly linearly independent) vectors ${\bf a}_k \in{\mathbb R}^n$ $\ (1\leq k\leq n)$ in the form ${\bf a}_k=(a_{1k}, a_{2k}, \ldots,a_{nk})$. The data $a_{ik}$ can be organized as a matrix; but it makes no sense "to orthogonalize" this matrix. On the other hand it makes sense to apply a Gram-Schmidt-process to the vectors ${\bf a}_k$, resulting in a new $n$-tuple $({\bf e}_1,{\bf e}_2,\ldots,{\bf e}_n)$ of vectors ${\bf e}_k$ which is ${\bf by\ construction}$ orthonormal and has the additional property that the spans $\langle{\bf e}_1,\ldots,{\bf e}_k\rangle$ are equal to $\langle{\bf a}_1,\ldots,{\bf a}_k\rangle$ for $1\leq k\leq n$.

Each vector ${\bf e}_k$ has components $e_{ik}$ $\ (1\leq i\leq n)$, and the matrix $E$ of these $e_{ik}$ satisfies $E^{\rm tr}E=I$ ${\bf automatically}$, because the ${\bf e}_k$ are orthonormal.

-

Let $V$ be a finite dimensional complex inner product space, and let $f:V\to V$ be a linear morphism. Then we say that $f$ is orthogonally diagonalizable if $V$ has an orthonormal basis of eigenvectors of $f$.

Theorem. The morphism $f$ is orthogonally diagonalizable if and only if $f$ and its adjoint $f^\ast$ commute.

This deals with the complex case (where inner product space means vector space with a hermitian inner product.)

If you're interested in the real case, you need a bit more than just $f$ being normal.

Theorem. Let $V$ a finite dimensional real inner product space, and let $f:V\to V$ be a linear morphism. Then $V$ has an orthonormal basis of eigenvectors of $f$ if and only if $f=f^\ast$.

This is the general theory. By choosing a basis for $V$ you get the corresponding statements for matrices.

-
I don't think this is what the OP means by "orthogonalizable". I think the OP is wondering if Gram-Schmidt applied to the rows of a matrix always returns an orthogonal matrix. –  Jason DeVito Dec 11 '11 at 18:39
i feel like someone who understands all of the words of your answer wouldn't be asking the original question... –  Eric O. Korman Dec 11 '11 at 22:40