I have two sets of column vectors: $A = \{a_1,a_2,\dotsc,a_m\}$ and $B = \{b_1,b_2,\dotsc,b_n\}$. I have orthornormal basis for both of them individiaully. $\{u_1,\dotsc,u_p\}$ is an othornormal basis for $A$ and $\{v_1,\dotsc,v_p\}$ is an othornormal basis for $B$.
Is there a way to find an orthonormal basis for $A\cup B$ without using Gram -Schmidt orthogonalization on $\{u_i\}\cup \{v_i\}$?.