Let $X\in \mathbb{R}^{m\times n}$ be a matrix with linearly independent columns and let $\mathcal{N}$ be a neighborhood of $X$ such that every $Y\in \mathcal{N}$ has linearly independent columns as well.
Now let $F\colon \mathcal{N}\to \mathbb{R}^{m\times n}$ be a function that maps $Y\in \mathcal{N}$ to the output of the Gram-Schmidt orthonormalization procedure applied to the columns of $Y$ (similarly arranged in a matrix).
I see that $F$ is a smooth function of $Y$ in $\mathcal{N}$, and this is also mentioned in some books, but computing any sort of "formula" for the (partial) derivative(s) of $F$ at $X$, with respect to each variable-entry of $Y$, seems impractical. That said:
Is there a simple (perhaps iterative) formula for the (partial) derivative(s) of $F$ at $X$? If yes, how can I compute it?
Two-column case ($n=2$):
Suppose that $X=[u,v]$ where $u,v\in \mathbb{R}^m$ and define $$G\colon [u,v]\mapsto \begin{bmatrix} u, & v-\frac{\langle v,u\rangle}{\|u\|^2}u \end{bmatrix}\doteq [G_1(u,v), \ G_2(u,v)],$$ which is the output of a Gram-Schmidt orthogonalization (not -normalization) process. Then, if my computations are correct:
- $D_u G_1(u,v) = I_m$, where $I_m$ is the $m\times m$ identity matrix;
- $D_v G_1(u,v) = 0$;
- $D_u G_2(u,v) = \frac{1}{\|u\|^2}\left(\frac{2\langle u,v \rangle}{\|u\|^2}uu^T - \langle u,v \rangle I_m - uv^T\right)$;
- $D_v G_2(u,v) = I_m - \frac{uu^T}{\|u\|^2}$.
Then since
$$F\colon [u,v]\mapsto\begin{bmatrix} \frac{G_1(u,v)}{\|G_1(u,v)\|}, & \frac{G_2(u,v)}{\|G_2(u,v)\|} \end{bmatrix}\doteq [F_1(u,v), \ F_2(u,v)]$$
it holds that:
- $D_{u,v} F_{1,2}(u,v)=\frac{D_{u,v}G_{1,2}(u,v)}{\|G_{1,2}(u,v)\|} - \frac{D_{u,v}G_{1,2}(u,v)^T G_{1,2}(u,v)G_{1,2}(u,v)^T}{\|G_{1,2}(u,v)\|^3}.$
Even if this is all correct, I wonder whether there is a shorter way of rewriting it (for larger $n$ as well)...