I have basis set ${\cal K}=\{v_1,\dots,v_{k-d},b_1,\dots,b_d\}$ of $\mathbb{R}^k$.
I'd like to get $\cal W=\{w_1,\dots,w_d\}$ by linear combinations of the elements of $\cal K$ such that $\cal K\cup W$ is a basis for $\mathbb{R}^k$ and $w_i \bot v_j$ for all $i=1,\dots,d$ and $j=1,\dots,k-d$.
I know that using Gram-Schmidt process, I can get an orthonormal basis from $\cal K$. Howover, what I want here is the first $k-d$ elements of the new basis are still the same with $\cal K$, but the rest are orthogonal with them. Any suggestion? Thanks for any help
Form the matrix $A$ whose rows are $v_1,\dots,v_{k-d}$. Find (by the standard methods) a basis for the nullspace of $A$. Every one of those basis vectors will be, by construction, orthogonal to every $v_i$, so those basis vecrtors are