 Construct a Householder reflection from the vector, then apply it to the smaller matrix (embedded in the larger size with a 1 at the bottom right corner).The problem of finding the orthogonal matrix nearest a given matrix is related to the Orthogonal Procrustes problem.There are several different ways to get the unique solution, the simplest of which is taking the singular value decomposition of and replacing the singular values with ones.