Orthogonality
Orthogonality is an important property for relating two vectors, or two subspaces, or a vector and a plane. The math notation is ⊥, as in x ⊥ y.
Orthonormality is an expanded concept, requiring that the components be unit vectors.
Vectors
The concept of orthogonality is a generalization of perpendicularity in 2-dimensional space.
The Pythagorean theorem specifies that the sides of a right triangle are characterized by x2 + y2 = z2.
For a vector x, the total length can be thought of as the sum of each components' absolute value. If x is [1 2 3], the length is 6. The squared length can be thought of as the sum of each components' square. For the same x, this is 14. This can be generalized as xTx.
For a similar reason, the total length of the hypotenuse can be thought of as the sum of the other two vectors: x+y. Continuing with the example for x, if y were [2 -1 0], then z would be [3 1 3]. Note that the squared length can be written as (x+y)T(x+y).
If the vectors x and y are perpendicular then the Pythagorean theorem should hold: xTx + yTy = (x+y)T(x+y). This expands to xTx + yTy = xTx + yTy + xTy + yTx. By cancelling out common terms, this simplifies to 0 = xTy + yTx.
It must be understood that the last two terms are the same value. Therefore, this further simplifies to 0 = 2xTy and finally to 0 = xTy.
The test for orthogonality of two vectors is xTy = 0.
Subspaces
For a subspace S to be orthogonal to a subspace T, every vector in S must be orthogonal to every vector in T.
Vectors and Planes
The null space of a matrix A contains the vectors that are not in the row space. These vectors cancel out; they are not a linear combination of the rows; if the row space is a plane, then these vectors are not on that plane.
The null space of A (a.k.a. N(A)) is orthogonal to the row space of A (a.k.a. R(A)). The null space of AT (a.k.a. N(AT)) is orthogonal to the column space of A (a.k.a. C(A)). Commonly this means that the row and column spaces are planes while the null spaces of A and AT are vectors, but that isn't always true.
Matrices
If a matrix is composed of orthonormal columns, then it is a matrix with orthonormal columns. These are usually denoted as Q. This has an important property: QTQ = I.
The projection of A if A is a matrix with orthonormal columns simplifies from P = A(ATA-1)AT into P = QQT. Correspondingly, the system of normal equations simplifies from ATAx̂ = ATb into x̂ = QTb.
If a matrix with orthonormal columns is also square, only then can it be called an orthogonal matrix. This has an additional important property: QT = Q-1.
For example, if Q is square, then the projection matrix further simplifies to P = I.