Motivation
A displacement contains more information than a distance: moving four units right and one unit up is different from moving one unit right and four units up. Coordinates retain these separate contributions. Vectors allow us to add displacements, compare directions, and separate a movement into parts parallel and perpendicular to a chosen direction.
The same calculations make sense in any positive integer dimension . Geometry in two or three dimensions helps explain the formulas, but proofs using coordinates work throughout . We will distinguish a vector from a scalar throughout: a sum of vectors is a vector, whereas a dot product is a real number. Zero inputs require particular care whenever a formula involves division by a length.
Coordinates and vector operations
Definition
Vectors, standard basis, and operations
For , a vector in is an ordered tuple of real numbers. Let have entry in position and elsewhere. Then
The vectors form the standard basis. In we also write ; in , . For and scalar , define
Set and . Two vectors are parallel when one is a scalar multiple of the other. This convention includes the zero vector, since for every .
The coordinate representation is unique: the th coordinate of the displayed sum is exactly . Tuples must have the same dimension before addition. A negative scalar reverses the direction of a nonzero vector, a positive scalar preserves it, and scalar zero erases direction altogether.
Concept lensGeometric
Coordinates describe a displacement, not a fixed arrow
Represent and by arrows and . Translating the second arrow so its tail is at does not change its components. Its new endpoint satisfies . This is the head-to-tail rule and also the diagonal of the parallelogram built from .
Subtraction answers a different question: the displacement from to is . Thus exchanging the endpoints changes the sign. Coordinate addition and the arrow construction describe the same operation; a vector records a displacement without requiring its arrow to start at the origin.
Theorem
Vector arithmetic laws
For and ,
Every identity follows coordinate by coordinate from the corresponding real number law. For example, the th coordinates of and are and , which are equal by real distributivity. Real commutativity, associativity, identity and inverse laws likewise establish the other displayed statements for each , hence for the whole tuples.
Norm and unit direction
Definition
Euclidean norm and normalization
The norm of is
It is nonnegative, and it is zero exactly when . A vector of norm is a unit vector. For , its unit vector in the same direction is .
The zero-norm assertion holds because a sum of nonnegative squares is zero exactly when every square is zero. For every real scalar ,
Taking the nonnegative square root introduces , not . Consequently and when . There is no unit direction obtained by normalizing the zero vector.
Worked example
Coordinate arithmetic and a unit vector
For and , addition gives . For the different pair and , subtraction gives , the displacement from endpoint to endpoint . Scaling gives , , and .
For , Pythagoras gives , so . Its squared norm is . Also ; reversing direction does not produce a negative length.
Dot product and Cauchy–Schwarz
Definition
Dot product and orthogonality
For ,
In particular and , a scalar zero. Vectors are orthogonal when . Algebraically the zero vector is orthogonal to every vector, although it has no direction or angle.
Theorem
Dot-product laws
For and ,
Moreover if , and otherwise.
For distributivity, expand and separate the two finite sums. Symmetry follows from , and the scalar law follows by pulling outside the sum. The basis statement follows by checking whether the two nonzero entries occupy the same coordinate. Thus algebraic expansion of squared norms is justified by these laws, rather than by a picture.
Theorem
Cauchy–Schwarz inequality with all equality cases
For ,
Equality holds exactly when the two vectors are linearly dependent: one is a scalar multiple of the other, including every pair with a zero vector.
Proof: A nonnegative squared residual controls the dot product
Boundary first. If , both sides are zero and equality holds; the pair is dependent. We may therefore assume .
Legal choice. Set . The denominator is strictly positive. Dot-product expansion gives
Conclusion. Multiply by the positive denominator and take nonnegative square roots. This yields Cauchy–Schwarz without assuming an angle formula.
Equality dependency. Equality holds precisely when , that is, . Conversely this relation gives equality by norm scaling. Together with the separate case, this covers every dependent pair. Writing only without the separate zero case would miss nonzero paired with .
Checkpoint
Q1. Is the dot product of the zero vector with v a vector or a scalar? Can an angle be assigned?
Keep the output type separate from the zero-input condition.
Solution · Quick-check Q1
It is the scalar . An angle involving the zero vector is undefined, even though the algebraic dot product and orthogonality relation are defined.
Angle and signed area
For nonzero , Cauchy–Schwarz places in . The angle is therefore determined by
In the plane this agrees with the geometric angle: expand and compare with the cosine law. For nonzero vectors, a positive dot product gives ; zero gives ; negative gives . The endpoints correspond to parallel directions. Orthogonality is equivalent to a right angle only when both vectors are nonzero.
Worked example
A dot product and an obtuse angle
For and , . The output is one scalar, not a new vector. For and , we have , , and . Thus and . Both norms are nonzero, and the negative dot product correctly predicts an obtuse angle.
For in the oriented plane, its counterclockwise quarter-turn is . The signed parallelogram area is
For nonzero vectors and the directed angle from to , this equals . Indeed the quarter-turn changes the cosine expression to . This directed angle records orientation, unlike the unsigned angle . Ordinary area is ; exchanging the two vectors reverses the sign. The coordinate formula also handles zero or parallel vectors, giving zero area without assigning an angle to zero.
Worked example
Orientation changes the sign of area
, whereas . For and ,
The ordinary area is . Reversing the order gives signed area but the same ordinary area; the sign describes orientation, not negative size.
Projection and orthogonal decomposition
Length alone cannot tell us how much of one displacement points along another. For a nonzero direction , the signed scalar component of is . Dividing the dot product by instead gives the coefficient multiplying in the projection vector. This is why projection follows norm and angle.
Theorem
Projection onto a nonzero direction
Let with . Define
Then is a multiple of , , and . This decomposition into a multiple of and a vector orthogonal to is unique.
To derive the formula, write . The required condition becomes , which has the unique solution . Substitution verifies the orthogonality. This also proves uniqueness, since every admissible parallel component must have that coefficient. The residual is perpendicular to , not generally to .
Orthogonality also explains how projection affects length. Since is a multiple of and , we have . Expanding the squared norm of therefore gives
Thus : projection cannot increase length. Equality holds exactly when , meaning that already lies along the chosen direction. This includes and also negative multiples of ; projection onto the direction line does not discard the opposite direction. The residual accounts for precisely the squared length missing from the projected component, so the inequality follows from the decomposition itself.
When , the same formula is . The scalar component along is signed: it is negative for an obtuse angle. The norm of the projection is , so confusing scalar component with length loses a sign. If , the algebraic projection is zero without requiring an angle.
Worked example
Projecting in either direction gives different vectors
For and , and . Hence
Check and . But , so the residual is not perpendicular to . Reversing the projection gives , since . The dot product is symmetric, but the projection operation is not.
Counterexample mode
The zero vector cannot supply a projection direction
The claim that the displayed projection formula works for every is false. Take and . Its coefficient becomes , which is undefined; a zero numerator does not repair a zero denominator.
The correct hypothesis is . Projecting onto a nonzero is permitted, but projecting onto a zero direction is not defined by this formula. The same distinction applies to normalization: only a nonzero vector has the unit direction .
Checkpoint
Q2. Which vector is orthogonal to the projection residual, and which denominator must be nonzero?
Use the equation that determines the projection coefficient.
Solution · Quick-check Q2
The residual is orthogonal to the direction vector . The denominator is , which is positive exactly when .
Triangle inequality and the parallelogram law
Theorem
Triangle inequality and equality
For ,
Equality holds if either vector is zero, or if both are nonzero and one is a positive scalar multiple of the other. Equivalently, one vector is a nonnegative scalar multiple of the other, with either ordering allowed.
By the dot-product laws and Cauchy–Schwarz,
Both sides before taking square roots are nonnegative. Equality requires both inequalities to be equalities: dependence from Cauchy–Schwarz, together with . For two nonzero dependent vectors this requires the same direction. If either vector is zero, direct substitution gives equality. Opposite nonzero directions give Cauchy–Schwarz equality but strict triangle inequality, so dependence alone is insufficient here.
Expanding both squared norms and adding cancels the mixed terms:
This is the parallelogram law. Its diagonals are represented by and ; the four side lengths contribute twice each of and . It remains true when the parallelogram degenerates.
Summary
Coordinate laws support geometric reasoning in every . The dot product gives squared length and orthogonality; Cauchy–Schwarz makes the angle formula valid and identifies dependent equality cases. Projection separates a vector along a nonzero direction, while the triangle inequality additionally distinguishes same from opposite directions. Signed planar area records orientation, and the parallelogram law compares sides with diagonals.
Exercises
- Compute the projection decomposition of along . Verify the sum and the required orthogonality directly.
- For and , decide whether equality holds in Cauchy–Schwarz and in the triangle inequality. Repeat with .
- A circle has centre , positive radius , and diameter . If lies on the circle with , prove using dot products. Explain the endpoint restriction.
- Derive the parallelogram law by writing out both squared norms, and check it for and .
Guided solutions
Solution · Solution 1
and , so
Their sum is . Also , while is visibly a multiple of .
Solution · Solution 2
For , , but . The vectors have opposite directions. For , both inequalities are equalities; no angle is needed.
Solution · Solution 3
Use as origin and write , , . Then and
The mixed terms cancel by symmetry. Since , both vectors are nonzero, so orthogonality gives the stated right angle. At an endpoint one vector would be zero, and the angle would be undefined.
Solution · Solution 4
The two expansions are ; adding gives the law. For the given vectors, , , , and . Thus both sides are .