Euclidean vector (source code)

= Euclidean vector
{title2=$\mathbf v\in\mathbb R^n$}
{wiki}

A <Euclidean vector> is a <vector> in a finite-dimensional real <inner product space>. Choosing an <orthonormal basis> identifies it with its real <vector components> in $\mathbb R^n$. A geometric arrow represents a <Euclidean vector> by a length and a direction; translating the arrow without changing either represents the same <Euclidean vector>. The <zero vector> has length zero and no distinguished direction.<University Physics Volume 1 by William Moebs and others/2.1 Scalars and Vectors>[University Physics Volume 1 by William Moebs and others; §2.1, Figures 2.2–2.5: vector arrows, equal vectors and displacement]{ref}

For points $P=(1,1)$ and $Q=(4,5)$ in a <Cartesian coordinate system>, the <displacement> is $Q-P=(3,4)$. The arrow from $(-2,0)$ to $(1,4)$ represents the same <Euclidean vector>, even though its endpoints differ. An endpoint is a position; their difference is a <vector>. In an <orthonormal basis> $(\mathbf e_1,\mathbf e_2)$,
$$
\mathbf v=(3,4)=3\mathbf e_1+4\mathbf e_2,\qquad
\|\mathbf v\|_2=\sqrt{3^2+4^2}=5.
$$
The <Euclidean norm> comes from the <inner product>: $\|\mathbf v\|_2^2=\langle\mathbf v,\mathbf v\rangle$. The sum of squared <vector components> is valid in an <orthonormal basis>; an arbitrary <basis> requires the appropriate <Gram matrix>. This distinction lets the geometric <vector> stay the same while its <coordinate vector> changes.<University Physics Volume 1 by William Moebs and others/2.2 Coordinate Systems and Components of a Vector>[University Physics Volume 1 by William Moebs and others; §2.2, Cartesian coordinates: equations (2.10)–(2.13) and Figure 2.16, unit basis vectors and scalar components]{ref}

<Vector addition> is componentwise. With $\mathbf u=(2,1)$ and $\mathbf w=(1,3)$,
$$
\mathbf u+\mathbf w=(3,4).
$$
Geometrically, translate the second arrow so its tail starts at the first arrow's head. The <vector sum> joins the starting point to the final endpoint. Reversing the order gives the other route around the same <parallelogram>, so <vector addition> is <commutative>. This is the useful bookkeeping behind adding successive <displacements>, <velocities>, or <forces>: direction information survives the calculation. For a <force>, the <Euclidean vector> alone does not specify its point of application, which also affects the <torque>.<University Physics Volume 1 by William Moebs and others/2.1 Scalars and Vectors>[University Physics Volume 1 by William Moebs and others; §2.1, Algebra of Vectors in Two Dimensions: Figure 2.12 and the head-to-tail construction]{ref}

\Image[/euclidean-vector-addition-two-routes.png]
{title=Two orders of vector addition reach the same endpoint}
{description=The original <Euclidean vectors> $\mathbf u=(2,1)$ and $\mathbf w=(1,3)$ form a <parallelogram>. Either head-to-tail route gives their <vector sum> $(3,4)$; dashed copies are translated arrows, not additional terms.}

The magnitude of a <vector sum> is generally different from the sum of the magnitudes. Here $\|\mathbf u+\mathbf w\|_2=5$, whereas $\|\mathbf u\|_2+\|\mathbf w\|_2=\sqrt5+\sqrt{10}>5$. The <triangle inequality> explains why the direct <displacement> cannot exceed the length of this two-segment route. A return <displacement> $(-3,-4)$ makes the net <vector sum> zero, although the lengths of the three travelled segments sum to a positive number.

The <dot product> exposes direction quantitatively: for nonzero <Euclidean vectors>, $\langle\mathbf u,\mathbf w\rangle=\|\mathbf u\|_2\|\mathbf w\|_2\cos\theta$. For the displayed pair, the <dot product> is $2\cdot1+1\cdot3=5$, so $\cos\theta=1/\sqrt2$ and the angle is $45^\circ$. For <orthogonal vectors>, that <dot product> is zero. Dividing by magnitudes separates direction from size, which is the purpose of <vector normalization>.