Statistical Methods

Check a projection using a perpendicular residual

Define the task

A projection onto a specified direction answers how much of a vector lies along that direction. Match the coordinate order and units first. A projection in unstandardized coordinates can be dominated by variables measured on large scales. Document any centering or scaling before treating the geometry as meaningful.

Carry out the check

For a nonzero direction u and vector v, the projection is u times (u dot v)/(u dot u). Subtract the projection from v to obtain the residual. The residual should have dot product zero with u within numerical tolerance. Multiplying u by a nonzero constant changes its coefficient but leaves the projected vector unchanged.

Worked hypothetical example

For hypothetical u=(1,2) and v=(4,3), the cross-product is 10 and u dot u is 5. The coefficient is 2, the projected vector is (2,4), and the residual is (2,−1). Its dot product with u is 2−2=0. This is a geometric calculation without an intercept. It does not establish a causal effect or provide a regression uncertainty estimate.

Method checked 12 November 2026 against R documentation: Matrix Cross-Product.

Open the two-coordinate projection check.

Related reading

Reading path: Analyze data. Guide 125 of 132. Choose any guide to suit your project.

Statistical Methods

Audit a linear-system result with its residual

Check a computed linear-system solution using its residual.

Statistical Methods

Distinguish Leverage, Residual Size, and Influence

Investigate observations that shape a regression without treating a diagnostic threshold as an automatic exclusion rule.

Browse this reading pathTools for this stageGuides and downloads for this stage