The following question is related to research I am doing on reinforcement learning on manifolds.
I have a set of basis vectors $\boldsymbol{B} = \{\boldsymbol{b}_1,\dots,\boldsymbol{b}_k\}$ that span a $k$-dimensional linear subspace of $\mathbb{R}^n$ ($\boldsymbol{b}_i \in \mathbb{R}^n$ $\forall \ i \in (1,\dots,k)$ and $k<n$). The basis vectors can change. I want a method for converting the basis vectors into an orthonormal basis that spans the same subspace as the original basis vectors with the requirement that the map from the subspace spanned by the basis vectors to the orthonormal basis is smooth.
More formally, Let $V_k(\mathbb{R}^n)$ be the Stiefel manifold, i.e. the set of orthonormal ordered $k$-tuples of vectors in $\mathbb{R}^n$, and $G_k(\mathbb{R}^n)$ be the Grassmannian manifold, i.e. the set of $k$-dimensional linear subspaces of $\mathbb{R}^n$. I want to find a smooth map that sends each $k$-dimensional linear subspace of $\mathbb{R}^n$ (a point in $G_k(\mathbb{R}^n)$) to an orthonormal $k$-tuple of vectors in $\mathbb{R}^n$ (a point in $V_k(\mathbb{R}^n)$) that forms a basis for that subspace. The smoothness of the map is key.