Orthogonality and Least Squares/Inner Product, Length, and Orthogonality

Lesson 6.1952 words

Inner Product, Length, and Orthogonality

The dot product turns the algebra of vectors in R^n into geometry: length, distance, and perpendicularity. The inner product yields the norm, the Pythagorean theorem, and the orthogonal complement, and the null space of a matrix is the orthogonal complement of its row space.

╌╌╌╌

Row reduction settles whether a system has a solution, and vector spaces organize the solutions once they exist. Neither notion measures anything. To ask which vector is closest to another, or whether two directions are perpendicular, we need geometry on : length, distance, and angle. All three come from a single operation on pairs of vectors, the inner product.

Many applied systems have no exact solution because the data are noisy or over-determined. The best available makes as close as possible to , and closeness is a statement about distance — the setting of least-squares problems.

The inner product

For two vectors in , regard each as an matrix. The transpose is , so the product is a matrix, written as a single scalar.

For and ,

and gives the same value. Commutativity holds in general, alongside the other properties inherited from the transpose.1

Additivity and homogeneity combine, so the inner product distributes over any linear combination:

Every geometric fact below follows from these four properties, not from the coordinate formula, which is what later lets the vectors become functions and the dot product an integral.

Length and distance

The last property of the inner-product-properties theorem makes , so its square root is defined.

For , this is the length of the segment from the origin to by the Pythagorean theorem; the same calculation on the diagonal of a box recovers the usual length in . Scaling a vector scales its length by the absolute value of the scalar, , since .

A vector of length is a unit vector. Dividing a nonzero by its length produces the unit vector in the same direction; the operation is normalizing .

On the number line this reduces to , the familiar distance in . In and it is the Euclidean distance between the two points.

The distance between u and v is the length of u - v; translating that difference vector to the origin shows the same length as the segment joining the two points.

Orthogonal vectors

Perpendicularity of two lines through the origin has a clean algebraic test. Consider and and compute

The lines through and are geometrically perpendicular exactly when , and expanding both squared distances shows this happens if and only if .

The zero vector is orthogonal to every vector, since always. The expansion above, read with , collapses the cross term and gives a familiar identity.

When u and v are orthogonal, they are the legs of a right triangle whose hypotenuse is u + v, and the Pythagorean relation on the three lengths holds exactly.

For nonzero in or , the inner product carries the angle between the two segments through the law of cosines:

When this equation defines the angle. Orthogonality is the case . In statistics, the same quantity, computed for mean-centered data vectors, is the correlation coefficient.

Orthogonal complements

Perpendicularity extends from single vectors to whole subspaces. If a vector is orthogonal to every vector in a subspace of , then is orthogonal to .

Take a plane through the origin in and the line through the origin perpendicular to it. Every vector on is orthogonal to every vector in , and vice versa, so and .

In R^3 a plane W through the origin and the line L normal to it are orthogonal complements of each other: every vector on one is perpendicular to every vector on the other.

Two facts follow directly from the inner-product properties, and both are used repeatedly later:

  • Spanning-set test. A vector is in if and only if is orthogonal to every vector in a set that spans . Being orthogonal to a spanning set forces orthogonality to all linear combinations.
  • is a subspace. It is closed under addition and scalar multiplication, again by additivity and homogeneity of the dot product.

The row space and the null space

The orthogonal complement connects two subspaces attached to a matrix. Recall that is the span of the rows of and is the solution set of (null and column spaces).

The proof is the row–column rule read as a statement about dot products. If is in , then means each entry of — the dot product of a row of with — is zero. So is orthogonal to every row, hence to their span . Conversely, if is orthogonal to , it is orthogonal to each row and . This proves the first identity. Applying it to , whose row space is , gives the second.

This is the orthogonal picture of the fundamental subspaces. The four subspaces attached to split and into perpendicular pairs.

The four fundamental subspaces of an m-by-n matrix: in the domain R^n, the row space and null space are orthogonal complements; in the codomain R^m, the column space and the null space of A-transpose are complements.

A dimension count completes the picture. If is any subspace of , then

Writing for a suitable , the orthogonal-complements theorem gives , and the Rank Theorem () supplies the sum.

Normalization and orthogonality together

Summary

ConceptDefinitionGeometric reading
Inner product
Lengthdistance from origin
Distanceseparation of two points
Orthogonalperpendicular directions
vectors orthogonal to all of complementary subspace,

Length, distance, angle, and perpendicularity all reduce to the inner product, and the orthogonal-complements theorem identifies with . An orthogonal basis turns each projection weight into a single dot product.

Footnotes

  1. Lay, §6.1 — Inner Product, Length, and Orthogonality; Theorem 1 and the definitions of length, distance, orthogonality, and the orthogonal complement, with Theorem 3 relating to .

╌╌ END ╌╌