# Fast simultaneous orthonormal basis computation for multiple nullspaces

Consider vectors $a_i\in R^{m\times n}$ and $B\in R^{m\times p}$, with $n +p < m$, and assume that the columns of $(A, B)$ are linearly independent. To compute an orthobasis for $\text{ker}(A)$, it is sufficient to perform an SVD of $A=U\Lambda V^T$ and take the column vectors of $V$ corresponding to the zero singular values of the SVD. Now for the interesting question: suppose that I want to find an orthobasis for $\text{ker}(A)$ such that the $p+1, \ldots, m-n$ elements of this basis be orthogonal to the column vectors of $B$. It is possible to compute such basis efficiently by means of one or more decompositions?

Put it another way: How can I efficiently compute an orthobasis for $\text{ker}(A)$ such that its $p+1, \ldots, m-n$ elements are in $\text{ker}(B)$?

-