Normalize the residual of a Gram-Schmidt step
Divide an orthogonal vector by its length to produce a unit vector. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.
For a nonzero vector, the unit vector in its direction is
The check is one line. Square each entry of, add, and require: That single sum detects every normalising slip, and it costs two multiplications per entry.
What stays the same and what changes. points in exactly the same direction as — it is a positive multiple of — and only its length changed, from to. So orthogonality to other vectors is preserved: if then.
Where it happens in Gram-Schmidt. Subtracting the projections builds the orthogonal vectors; normalising happens afterwards, once per vector. Dividing at the start would put a square root inside every later dot product.
The reason is dimensional, and it is worth stating because it generalises to every scaling question.
Scaling a vector multiplies its length by the absolute scale. If, then. To get you need, i.e.. Dividing by gives and hence, which is only when was already unit.
Squaring is not linear, so it does not behave like the thing it is applied to. Doubling doubles but quadruples. Any formula that should be homogeneous of degree one in the vector has to use, not.
The same fact again in dot-product language. is the squared length by definition, so anything that starts from is already one level too high. That is why the projection coefficient is — the denominator is the squared length because it is compensating a dot product, not because lengths are squared in general.
Why orthogonality survives normalisation. If and, then. Scaling one vector of a perpendicular pair keeps the pair perpendicular, which is why normalising after all the subtractions is safe.
From the textbook's triple,, the orthogonal vectors are
Lengths.,,, so,,.
Unit vectors.
Verify all three. ✓, ✓, ✓
Verify orthogonality survived. ✓ — the scaling factors multiply, and the dot of the unscaled vectors was already zero.
The diagonal. Those three lengths are exactly the diagonal of in:. The squared lengths are the diagonal of, which is where they naturally come from and why the two are easy to confuse.
- Divide an orthogonal vector by its length to produce a unit vector
- Distinguish the length from the squared length and say which one the division uses
- Verify ||q||^2 = 1 and explain the sign convention
(a) Normalise. (b) What is for, and what is the unit vector? (c) Two students write and. Which is unit, and what is the other's squared length?
Answers
(a), so, and ✓
(b) and, so.
(c) is unit. has squared length — it divided by instead of.