Given independent $v_1,\ldots,v_k$, set $u_1=v_1$ and $u_j=v_j-\sum_{i<j}u_i\langle u_i,v_j\rangle/\|u_i\|^2$. Then normalize $q_j=u_j/\|u_j\|$. Each step removes components along earlier directions. Modified Gram–Schmidt or Householder QR is preferable to classical Gram–Schmidt when numerical stability matters.
Like how this is organised?
Build your own knowledge tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.