# Diagonalizing a matrix for producing a orthogonal set of functions.

Given a basis $B = \{g_0, g_1,\ldots , g_{nk}\}$, I wish to construct a set of $nk$ functions $S$ such that $\langle S_i,S_j \rangle = \delta_{i,j}$ (so that $S$ is an orthonormal set) where $\langle f,g\rangle = \int_{0}^{\infty}f g$.

Assuming the following definitions: $$S_k = c_{k,0}\cdot g_0 + c_{k,1}\cdot g_1 +\cdots + c_{k,nk}\cdot g_{nk}$$

$C$ is a matrix where $C_{i,j} = c_{i,j}$

$G$ is a matrix where $G_{i,j} = \langle g_i,g_j \rangle$

Then it is easy to see that $CGC^T$ is a matrix with elements equal to $\langle S_i,S_j \rangle$. Thus, if $CGC^T = I$, then $C$ is the matrix containing the correct coefficients to produce the set of functions $S$. Now, upon diagonalizing the matrix $G$, we can generate a matrix $P$ where $PGP^T$ is diagonal with eigenvalues on the main diagonal.

What changes do I need to make to $P$ in order to produce $C$? Is it as simple as making small changes to $P$ or will I need to pursue another method altogether?

-

Let the diagonal elements of $PGP^T$ be $d_k$ and $P=(p_{i,j})$. Then the functions $$\tilde S_k=\sum_j p_{k,j} g_j$$ are almost what you need except that they are orthogonal but not orthonormal. The squared norms of $\tilde S_k$ are equal to $d_k$, so $$S_k=\frac{1}{\sqrt d_k}\tilde S_k.$$ As far as I see this corresponds to multiplying $k$-th row of $P$ with $\frac{1}{\sqrt d_k}$ for all $k$ to get $C$.