Gram-Schmidt process
Gram-Schmidt is a step-by-step recipe for straightening a tilted set of axes into clean right angles. You feed it any basis and it hands back an orthonormal one that spans exactly the same space.
The trick is to fix the directions one at a time. Keep the first vector. For the next, subtract off its projection onto the direction you already fixed, leaving only the part that is genuinely new and perpendicular. Repeat, subtracting projections onto every direction settled so far, then normalize each result to length 1.
Picture two arrows leaning at a sharp angle. Gram-Schmidt keeps the first, removes from the second whatever overlaps the first, and pivots it until it stands at a true right angle, then trims both to unit length.
Subtract v2's projection onto v1, leaving a piece perpendicular to v1.
Carried out on a matrix's columns, Gram-Schmidt is exactly what produces the Q in QR decomposition.