Let $E$ and $F$ be two inner product spaces associated with their orthonormal basis and let $l$ be a linear application from $F$ into $E$.
I consider the endomorphism in $E$ : $f = l \circ l^t$ (where $l^t$ is the transposition of l.)
I suppose that I know the matrix $M$ associated with $l$. So the matrix associated with $e$ is $M.M^t$
Let $E_1$ be a subspace of $E$ and let $F_1$ be the inverse image of $E_1$ by l ($F_1$ is a subspace of $F$). For simplicity, I suppose that $E_1$ is generated by the first $m$ vectors of the basis of $E$ i.e., coordinates $x_i$ of the vectors of $E_1$ are all $0$ for $i \gt m$.
let $l_1 : F_1 \rightarrow E_1$ be the restriction of $l$ to $F_1$ and, similarly to $f$, I define $f_1=l_1 \circ l_1^t$ (endomorphism in $E_1$).
As in general, $l^t(E_1) \neq F_1$, $f_1$ is not the restriction of $f$ to $E_1$
I would like to determine the matrix $M \in M_{m,m}$ associated with $f_1$ in the basis of $E_1$ (the first $m$ vectors from the basis of $E$).
Some workaround :
I suppose that M is square (E and F have the same dimension) and inversible. So I can have $M^{-1}$ and $F_1=M^{-1}(E_1)$. Actually, the m first columns of $M^{-1}$ provide a non-orthogonal basis of $F_1$.
I would like to dispose of an new orthogonal basis of $F$ having its m first vectors in $F_1$. If I had the matrix $C$ associated with the change of basis from the canonic basis of $F$ to this new basis, I would be able to convert M for this new basis : $M'=M.C$. The upper left submatrice $M_1'$ (m lines ,m columns) would be the matrix of $l_1$ with $E_1$ and $F_1$ provided with their basis. So the matrix of $f_1$ would be $M_1'.M_1'^t$.
If I am not wrong, I just need to figure out how to build the $C$ matrix for the change of basis. So to summarize : I dispose of m vectors that generate $F_1$, how can I devise a matrix $C$ that corresponds to a change of orthogonal basis so that the m first vectors of the new basis are in $F_1$ ?