What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Gram–Schmidt step formula: what it means and how to use it

Remove earlier vector directions to build an orthogonal basis. This orthogonality relationship belongs to linear algebra. Read the symbols against the problem, confirm the required conditions, and estimate the scale before calculating.

\[\mathbf u_k=\mathbf v_k-\sum_{j<k}\operatorname{proj}_{\mathbf u_j}\mathbf v_k\]

Check dimensions before using Gram–Schmidt step

Write the size and role of every vector, matrix, space, and transformation. An expression can look algebraically familiar while being dimensionally undefined. Rebuild missing background in the linear algebra subject guide, then use linear algebra practice to retrieve the relationship without being told its name.

Follow one object through Gram–Schmidt step

Track both the coordinates and the geometric or structural meaning:

\[From $(1,0)$ and $(1,1)$, the second orthogonal vector becomes $(0,1)$.\]

Carry out the transformation in a valid order

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $\mathbf v_k$ are independent input vectors and $\mathbf u_j$ orthogonal outputs.
  3. Check the conditions before substituting. The starting vectors must be linearly independent to avoid a zero denominator during normalization.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate - The check that catches most linear algebra slips.

An order or dimension error to avoid

What goes wrong: Students subtract projections onto the original input vectors rather than onto the orthogonal ones already built.

Why it fails: The original vectors overlap each other, so their shadows double-count the shared part and the result is not perpendicular to anything in particular.

Repair: Always project onto the finished u vectors. Starting from v₁ = (1, 1) and v₂ = (2, 0), set u₁ = (1, 1); then the shadow of v₂ on u₁ is (1, 1), so u₂ = (1, −1), and the check u₁ · u₂ = 1 − 1 = 0 confirms it.

Multiply back or test a simple vector

After using Gram–Schmidt step, repeat the calculation with units attached and test the result against a boundary case or a quick numerical estimate.

When the transformation statement holds

If a vector is already a combination of the earlier ones, subtracting the shadows wipes it out completely and u_k comes back as the zero vector, which cannot be normalized. That outcome is a signal that your starting set was dependent, not a computational error.

Questions about Gram–Schmidt step

Do I have to normalize at each step?

Not to get an orthogonal set, but you do to get an orthonormal one. Normalizing as you go also simplifies the arithmetic, since u · u becomes 1 and the projection denominators disappear.

Does the order of the input vectors matter?

Yes. The first vector always keeps its direction untouched, and every later one is cleaned relative to the ones before it, so reordering the inputs gives a different orthogonal basis for the same space.

What does this have to do with QR factorization?

The orthogonal vectors you build become the columns of Q, and the projection coefficients you compute along the way are exactly the entries of the upper triangular R.

Why do numerical libraries use a modified version?

Because subtracting all the shadows at once lets rounding errors accumulate. The modified version removes each shadow immediately and updates the vector before moving on, which keeps the result much closer to truly perpendicular.

Make it yours

Change one input, predict whether the output should rise, fall, or stay fixed, and only then recalculate.