---
title: Vector Algebra
module: Foundations
moduleNumber: 0
lessonNumber: 2
order: 2
summary: >
  Force, velocity, and displacement all carry a direction, so mechanics needs an
  arithmetic that respects it; adding magnitudes alone gives the wrong answer the
  moment two arrows point different ways. We set up vectors and their components in a
  chosen basis, then build the two products that carry most of the physics — the dot
  product, which extracts the part of one vector along another and yields work and
  power, and the cross product, which measures oriented area and yields torque and
  angular momentum. Rotating the axes changes the components while leaving the vector
  itself untouched, and the same component method resolves a force along whatever
  directions a constraint picks out.
topics: [Foundations]
draft: false
sources:
  - book: Tipler & Mosca
    ref: "Ch. 1 — Measurement and Vectors; §§1-6–1-7"
---

## Vectors and coordinate systems

A vector specifies magnitude and direction independently of coordinates. In a
Cartesian basis,

$$
\vec A=A_x\hat{\imath}+A_y\hat{\jmath}+A_z\hat{k},
\qquad A=\sqrt{A_x^2+A_y^2+A_z^2}.
$$

Components are signed scalar projections. They depend on the basis, whereas the
vector and its magnitude do not. In a plane, a vector of magnitude $A$ at angle
$\theta$ from the positive $x$ axis has $A_x=A\cos\theta$ and
$A_y=A\sin\theta$.

$$
% caption: A vector resolves into perpendicular components; the signed projections onto the two axes reconstruct the same arrow.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[->, black] (0,0) -- (5.0,0) node[right] {x};
  \draw[->, black] (0,0) -- (0,3.6) node[above] {y};
  \draw[dashed, black] (3.7,0) -- (3.7,2.4);
  \draw[dashed, black] (0,2.4) -- (3.7,2.4);
  \draw[->, black, thick] (0,0) -- (3.7,0) node[midway, below] {$A_x$};
  \draw[->, black, thick] (0,0) -- (0,2.4) node[midway, left] {$A_y$};
  \draw[->, acc, very thick] (0,0) -- (3.7,2.4) node[above right] {A};
\end{tikzpicture}
$$

**Bases and rotated coordinates.**

A vector is independent of the basis used to describe it. In a Cartesian basis, its
components are the coefficients of the basis vectors. Replacing those basis vectors
changes the component column while leaving the geometric vector unchanged. This is a
passive coordinate rotation. Rotating the physical vector in a fixed basis is an
active transformation; the two operations use inverse matrices.

An active counterclockwise rotation by an angle $\theta$ is

$$
\begin{pmatrix}x'\\y'\end{pmatrix}
=
\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}
\begin{pmatrix}x\\y\end{pmatrix}.
$$

Components in axes rotated counterclockwise by the same angle use the inverse matrix.
In an orthonormal rotation, the inverse is the transpose. This follows because the
new basis remains perpendicular and of unit length. Applying the forward matrix to
the new component column does not recover the old components; it applies a second
active rotation.

Transform a component column into the rotated basis, then apply the inverse
transformation. The original components must return within rounding error. Failure
indicates a reversed rotation sense, inconsistent angle units, or incorrect matrix
ordering. This check is required when a vector is resolved in an oblique or moving
coordinate system.


## Vector operations and geometry

Vector addition is componentwise:

$$
\vec A+\vec B=(A_x+B_x)\hat{\imath}
+(A_y+B_y)\hat{\jmath}+(A_z+B_z)\hat{k}.
$$

The head-to-tail construction gives the same componentwise sum. Subtraction is addition of
the opposite vector, $\vec A-\vec B=\vec A+(-\vec B)$. The order of
subtraction matters; addition is commutative but subtraction is not.

> **Worked example (Component sum and difference).** For $\vec A=(3,-2,1)$ and
> $\vec B=(-4,5,2)$, add and subtract componentwise:
>
> $$
> \vec A+\vec B=(-1,3,3),\qquad \vec A-\vec B=(7,-7,-1).
> $$
>
> Signed components carry the direction. Taking magnitudes before adding discards
> it and cannot represent general vector addition.

The component test for a closed path is more stringent than a visual impression
that arrows appear to return to their starting point. Add every horizontal component
and every vertical component independently. Both sums must vanish. In a displacement
loop, force polygon, or equilibrium construction, each arrow begins at the preceding
arrowhead. The final endpoint coincides with the initial tail only when both component
sums are zero.

The signs of the two planar components locate the resultant's quadrant. The inverse
tangent of a ratio gives only a reference angle between zero and ninety degrees. It
cannot distinguish a northeast vector from a southwest vector, since both can have
the same component ratio. Holding the component magnitudes fixed while changing their
signs gives the four possible directions.

$$
% caption: Left: signed components summing to zero close a vector polygon. Right: the sign pair of the two components selects the quadrant, which a bare inverse tangent cannot.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \begin{scope}
    \draw[->, thick] (0.3,0.4) -- (2.9,0.9) node[midway, below] {A};
    \draw[->, thick] (2.9,0.9) -- (3.7,2.7) node[midway, right] {B};
    \draw[->, thick] (3.7,2.7) -- (1.1,2.3) node[midway, above] {C};
    \draw[->, thick] (1.1,2.3) -- (0.3,0.4) node[midway, left] {D};
    \node[anchor=north] at (2.0,0.05) {(a) closed sum};
  \end{scope}
  \begin{scope}[shift={(7.2,1.5)}]
    \draw[->] (-2.4,0) -- (2.4,0) node[right] {x};
    \draw[->] (0,-2.2) -- (0,2.2) node[above] {y};
    \draw[->, thick] (0,0) -- (1.5,1.2) node[above right] {(+,+)};
    \draw[->, thick] (0,0) -- (-1.5,1.2) node[above left] {(-,+)};
    \draw[->, thick] (0,0) -- (-1.5,-1.2) node[below left] {(-,-)};
    \draw[->, thick] (0,0) -- (1.5,-1.2) node[below right] {(+,-)};
    \node[anchor=north] at (0,-2.5) {(b) quadrant signs};
  \end{scope}
\end{tikzpicture}
$$

The component method also applies along a specified physical direction rather than
along Cartesian axes. A projection takes a unit direction as part of the problem
data. The scalar projection gives the signed amount along that direction; the
remainder is perpendicular by construction. This decomposition gives force
components on an incline and velocity components along a trajectory.

Projection gives the geometric meaning of the dot product. Fix the magnitudes of two
vectors and rotate one through the included angle. The product changes only through
the projected component, hence through cosine. Aligned force and displacement
produce positive work, perpendicular directions produce zero work, and opposed
directions produce negative work.

$$
% caption: Left: A splits into a component along b and a perpendicular remainder. Right: the dot product follows the cosine of the included angle, vanishing at a right angle.
\begin{tikzpicture}[>=stealth, font=\footnotesize, x=0.72cm, y=0.72cm]
  \definecolor{acc}{HTML}{4A6FA5}
  \begin{scope}
    \draw[->, black] (0,0) -- (5.2,0) node[right] {b};
    \draw[->, acc, very thick] (0,0) -- (3.5,2.4) node[above] {A};
    \draw[dashed, black] (3.5,2.4) -- (3.5,0);
    \draw[->, acc, thick] (0,0) -- (3.5,0) node[midway, below] {along b};
    \draw[->, black, thick] (3.5,0) -- (3.5,2.4) node[midway, right] {remainder};
    \draw (3.5,0.34) -- (3.16,0.34) -- (3.16,0);
    \node[anchor=north] at (2.6,-0.6) {(a)};
  \end{scope}
  \begin{scope}[shift={(7.6,1.35)}]
    \draw[->, black] (0,-1.9) -- (0,2.0) node[above] {dot product};
    \draw[->, black] (0,0) -- (6.0,0) node[right] {angle};
    \draw[acc, very thick, domain=0:5.6, samples=100]
      plot (\x,{1.55*cos(180*\x/5.6)});
    \draw[dashed, black] (2.8,-1.75) -- (2.8,1.55);
    \node[anchor=north] at (2.8,-1.8) {right angle};
    \node[anchor=north] at (2.8,-2.4) {(b)};
  \end{scope}
\end{tikzpicture}
$$

The cross product retains the nonparallel contribution of two vectors. The dot
product depends on the parallel projection; the cross-product magnitude depends on
the perpendicular component. A positive area magnitude does not determine direction,
so torque and angular momentum require a right-handed orientation convention for the
ordered pair. Keeping the base and perpendicular height fixed while shearing the
parallelogram leaves its area unchanged: changes in the drawn side length and included
angle compensate so that the oriented area remains the same.

$$
% caption: Left: the ordered pair A then B fixes an out-of-page normal by the right-hand rule. Right: shearing at fixed base and height preserves the parallelogram area, hence the cross-product magnitude.
\begin{tikzpicture}[>=stealth, font=\footnotesize, x=0.8cm, y=0.8cm]
  \definecolor{acc}{HTML}{4A6FA5}
  \begin{scope}
    \draw[->, very thick] (0,0) -- (3.1,0.6) node[right] {A};
    \draw[->, very thick] (0,0) -- (0.9,2.3) node[above] {B};
    \draw[acc, thick] (2.0,1.9) circle (0.2);
    \fill[acc] (2.0,1.9) circle (2pt);
    \node[acc, anchor=west] at (2.35,1.9) {out of page};
    \node[anchor=north] at (1.6,-0.45) {(a)};
  \end{scope}
  \begin{scope}[shift={(6.2,0.35)}]
    \fill[acc!12] (0,0) -- (3.6,0) -- (4.6,1.7) -- (1.0,1.7) -- cycle;
    \draw[thick] (0,0) -- (3.6,0) node[midway, below] {base};
    \draw[thick] (0,0) -- (1.0,1.7) node[left] {B};
    \draw[dashed] (3.6,0) -- (4.6,1.7) -- (1.0,1.7);
    \draw[<->] (4.85,0) -- (4.85,1.7) node[midway, right] {height};
    \node[anchor=north] at (2.3,-0.5) {(b)};
  \end{scope}
\end{tikzpicture}
$$

Torque applies this orientation rule to a force at a particular position. The
relevant geometry is the perpendicular distance from the pivot to the force line of
action. A force applied far from a pivot has zero torque when its line of action
passes through the pivot, while a smaller force along a perpendicular line can
produce a turning effect.

$$
% caption: Torque uses the perpendicular lever arm from the pivot to the force's line of action, shorter than the full distance to the application point.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[fill=white, draw=black, thick] (0,0) circle (2.5pt) node[below left] {pivot};
  \draw[black, thick] (0,0) -- (4.0,0) node[midway, below] {r};
  \fill[black] (4.0,0) circle (1.6pt);
  \draw[->, acc, very thick] (4.0,0) -- (3.1,1.56) node[above right] {F};
  \draw[dashed, black] (4.3,-0.52) -- (2.8,2.08);
  \draw[acc, very thick] (0,0) -- (3.0,1.732);
  \node[acc, anchor=south east] at (2.5,1.55) {lever arm};
\end{tikzpicture}
$$

**Scalar multiplication, directed segments, and affine points.**

Multiplication by a scalar changes a vector's magnitude and may reverse its
direction. For a real scalar $c$,

$$
c\vec A=(cA_x,cA_y,cA_z),
\qquad
|c\vec A|=|c|\,|\vec A|.
$$

Positive $c$ retains the direction of $\vec A$; negative $c$ reverses it; and
$c=0$ gives the zero vector. The zero vector has no direction, so an angle assigned
to it has no physical meaning. This distinction matters when a force, velocity, or
displacement is multiplied by a signed coordinate difference. A coefficient may
carry units. If $\vec r$ has units of metres and $\omega$ has units of
$\mathrm{s^{-1}}$, then $\omega\vec r$ has units of speed. Addition requires
matching dimensions, whereas scalar multiplication changes dimensions according to
the scalar.

Position vectors require a declared origin. A displacement does not. For points
$A$ and $B$ with position vectors $\vec r_A$ and $\vec r_B$,

$$
\Delta\vec r_{A\to B}
=\vec r_B-\vec r_A.
$$

Changing the origin adds the same constant vector to both positions and leaves
$\Delta\vec r_{A\to B}$ unchanged. This difference is the vector needed in a
velocity calculation, a line-of-sight calculation, or the lever arm in a torque
calculation. It is incorrect to treat a location such as $\vec r_A$ as though it
were itself the displacement from $A$ to $B$; the origin enters the former but not
the latter.

Points along the straight segment from $A$ to $B$ have the affine form

$$
\vec r(s)=(1-s)\vec r_A+s\vec r_B
=\vec r_A+s(\vec r_B-\vec r_A),
\qquad 0\le s\le1.
$$

The coefficients add to one. That condition preserves the location when the origin
is shifted. A combination such as $2\vec r_A+\vec r_B$ has units of length
but does not represent an origin-independent point, because its coefficients sum
to three. Affine combinations occur in centre-of-mass calculations, finite-element
interpolation, and numerical placement of particles along a line segment.

For example, let
$\vec r_A=(1.20,-0.40,0.60)\ \mathrm m$ and
$\vec r_B=(-0.80,1.10,1.40)\ \mathrm m$. The displacement is

$$
\Delta\vec r_{A\to B}
=(-2.00,1.50,0.80)\ \mathrm m.
$$

At $s=0.25$, the point is
$\vec r(0.25)=(0.700,-0.025,0.800)\ \mathrm m$. Substitution at $s=0$ and
$s=1$ must return the two endpoints. The components of the displacement also
provide a sign check: the point moves toward decreasing $x$, increasing $y$, and
increasing $z$ as $s$ increases.

A chain of displacements adds associatively:

$$
\Delta\vec r_{A\to C}
=\Delta\vec r_{A\to B}+\Delta\vec r_{B\to C}.
$$

The intermediate point cancels when the two component differences are expanded.
The cancellation follows directly from component algebra. A path may have many
segments while the net displacement depends only on the endpoints. Total distance
is the sum of individual path-segment magnitudes and requires the full path when its
direction changes.

**Dot product and projection.**

The dot product is

$$
\vec A\cdot\vec B=A_xB_x+A_yB_y+A_zB_z=AB\cos\theta.
$$

It is a scalar. The projection of $\vec A$ on a unit direction
$\hat{b}$ is $A_\parallel=\vec A\cdot\hat{b}$, and the
projected vector is $\vec A_\parallel=A_\parallel\hat{b}$. The
perpendicular remainder is $\vec A_\perp=\vec A-\vec A_\parallel$.

The dot product gives work, $W=\vec F\cdot\Delta\vec r$, and power,
$P=\vec F\cdot\vec v$. A perpendicular force has zero dot product with the
displacement and does no instantaneous work.

**Cross product.**

The cross product is a vector perpendicular to both inputs. Its magnitude is

$$
|\vec A\times\vec B|=AB\sin\theta.
$$

The magnitude equals the area of the parallelogram spanned by the vectors. Its
direction is fixed by the right-hand rule, and reversing order reverses direction:

$$
\vec B\times\vec A=-\vec A\times\vec B.
$$

Torque and angular momentum use cross products: $\vec\tau=\vec r\times
\vec F$ and $\vec L=\vec r\times\vec p$. The perpendicular lever arm
rather than the full radius determines torque magnitude.

**Product calculations, determinants, and invariant checks.**

The component form of the dot product is a sum of matched components:

$$
\vec A\cdot\vec B=A_xB_x+A_yB_y+A_zB_z.
$$

It is commutative, so $\vec A\cdot\vec B=\vec B\cdot\vec A$. The result
has the product of the input dimensions. A force dotted with a displacement has units
of joules; a position dotted with a velocity has units of
$\mathrm{m^2\,s^{-1}}$. Units therefore distinguish a dot product from a
magnitude or an angle even when a numerical answer happens to have a familiar
value.

The cross product is evaluated from the determinant pattern

$$
\vec A\times\vec B=
\begin{vmatrix}
\hat{\imath}&\hat{\jmath}&\hat{k}\\
A_x&A_y&A_z\\
B_x&B_y&B_z
\end{vmatrix}.
$$

Expanding by the first row gives

$$
\vec A\times\vec B=
(A_yB_z-A_zB_y)\hat{\imath}
+(A_zB_x-A_xB_z)\hat{\jmath}
+(A_xB_y-A_yB_x)\hat{k}.
$$

Every term contains one component from each input vector. Swapping the two rows
changes the sign of every component, which yields
$\vec B\times\vec A=-\vec A\times\vec B$. The order is part of the
physical definition. Reversing $\vec r\times\vec F$ changes the direction of
the torque and cannot be repaired by changing only a sign in a later scalar
equation.

Take
$\vec A=(2,-1,3)$ and $\vec B=(1,4,-2)$. Direct substitution gives

$$
\vec A\cdot\vec B=-8,
\qquad
\vec A\times\vec B=(-10,7,9).
$$

Three checks follow from the same pair. First,
$\vec A\cdot(\vec A\times\vec B)=0$ and
$\vec B\cdot(\vec A\times\vec B)=0$; the cross product must be
perpendicular to both inputs. Second,

$$
|\vec A\times\vec B|^2+(\vec A\cdot\vec B)^2
=|\vec A|^2|\vec B|^2.
$$

Here the left side is $230+64=294$, while
$|\vec A|^2|\vec B|^2=14(21)=294$. Third, the sign of the first nonzero
cross-product component can be checked by a right-handed sketch of the two input
directions. The algebraic, metric, and geometric checks catch different error
classes; agreement among all three is stronger than a repeated determinant
expansion.

The scalar triple product combines a dot product and a cross product:

$$
[\vec A,\vec B,\vec C]
=\vec A\cdot(\vec B\times\vec C).
$$

Its magnitude is the volume of the parallelepiped based on the three vectors. Its
sign records orientation. A positive result means that the ordered basis
$(\vec A,\vec B,\vec C)$ has the same handedness as the declared Cartesian
basis; a negative result has the opposite handedness. A zero result indicates linear
dependence or coplanarity. This test appears when checking whether three direction
vectors define a volume, when computing a normal from two surface directions, and
when deciding whether a coordinate transformation reverses orientation.

For
$\vec C=(0,1,1)$ with the preceding $\vec A$ and $\vec B$,

$$
\vec A\cdot(\vec B\times\vec C)=16.
$$

The nonzero value confirms that the three vectors span three dimensions. Cyclic
reordering leaves this scalar unchanged:

$$
\vec A\cdot(\vec B\times\vec C)
=\vec B\cdot(\vec C\times\vec A)
=\vec C\cdot(\vec A\times\vec B).
$$

Interchanging any two vectors reverses the sign. These operations are safe only
when the parentheses and factor order are retained. In particular,
$\vec A\times(\vec B\times\vec C)$ is a vector, whereas
$\vec A\cdot(\vec B\times\vec C)$ is a scalar.

The vector triple product has a separate identity:

$$
\vec A\times(\vec B\times\vec C)
=\vec B(\vec A\cdot\vec C)
-\vec C(\vec A\cdot\vec B).
$$

The right side lies in the plane spanned by $\vec B$ and $\vec C$. A direct
expansion in Cartesian components confirms the identity and shows why the result
cannot generally point along $\vec A$. This matters in magnetic-force,
centripetal-acceleration, and rigid-body calculations, where an unparenthesized
sequence of crosses is ambiguous.

## Bases and coordinate transformations

A counterclockwise rotation of axes by $\phi$ uses

$$
\begin{pmatrix}A_x'\\A_y'\end{pmatrix}
=\begin{pmatrix}\cos\phi&\sin\phi\\-\sin\phi&\cos\phi\end{pmatrix}
\begin{pmatrix}A_x\\A_y\end{pmatrix}.
$$

The component values change, while magnitude and dot products remain invariant.
Axes aligned with a surface, string, or path simplify force components without
altering the underlying vector.

**Orthogonal and nonorthogonal bases.**

Cartesian unit vectors satisfy

$$
\hat{\imath}\cdot\hat{\imath}=1,
\qquad
\hat{\imath}\cdot\hat{\jmath}=0,
\qquad
\hat{\jmath}\cdot\hat{k}=0.
$$

In a Cartesian orthonormal basis, components equal scalar projections. For an
orthonormal basis $\{\hat{e}_1,\hat{e}_2,\hat{e}_3\}$,

$$
A_i=\vec A\cdot\hat{e}_i,
\qquad \vec A=\sum_iA_i\hat{e}_i.
$$

In a nonorthogonal basis, a dot product with one basis vector contains contributions
from the others. The Gram matrix $G_{ij}=\vec e_i\cdot\vec e_j$ records
those mutual angles. If $\vec A=A_i\vec e_i$, then its squared magnitude is

$$
|\vec A|^2=\sum_{ij}A_iG_{ij}A_j.
$$

The expression reduces to $A_x^2+A_y^2+A_z^2$ only for an orthonormal basis.
Mechanics usually uses Cartesian or local radial-tangential bases because their
geometry keeps force and motion equations transparent.

**Linear independence, skew bases, and conditioning.**

A set of vectors forms a basis for a space only when every vector in that space has
one and only one component expansion in the set. In two dimensions, two basis
vectors must be nonparallel. In three dimensions, the third vector must lie outside
the plane of the first two. With basis vectors as columns of a matrix $E$, an
ordinary component calculation has the form

$$
\vec a=E\vec c,
\qquad
\vec c=E^{-1}\vec a.
$$

The component column $\vec c$ exists uniquely when $E$ is invertible. For a
square matrix, this requires a nonzero determinant. In a planar basis whose unit
vectors have included angle $\alpha$, the determinant magnitude is
$|\sin\alpha|$. As the two axes approach parallel, the determinant approaches zero.
Small measurement changes in $\vec a$ then produce large changes in its reported
components, even though the physical vector is well defined.

$$
% caption: A skew basis resolves a vector as the diagonal of a parallelogram on nonperpendicular axes; as the axes approach parallel the parallelogram flattens and the components grow without bound.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[->, black, thick] (0,0) -- (4.6,0.5) node[right] {$e_1$};
  \draw[->, black, thick] (0,0) -- (1.9,3.0) node[above] {$e_2$};
  \draw[->, acc, very thick] (0,0) -- (3.5,2.35) node[right] {A};
  \draw[dashed, black] (2.162,0.235) -- (3.5,2.35);
  \draw[dashed, black] (1.34,2.115) -- (3.5,2.35);
  \fill[acc] (2.162,0.235) circle (1.7pt);
  \fill[acc] (1.34,2.115) circle (1.7pt);
\end{tikzpicture}
$$

In an orthonormal basis, dotting $\vec A$ with each unit basis vector produces
the components immediately. In a skew basis, dot products produce a coupled system.
Let $\vec A=c_1\vec e_1+c_2\vec e_2$ and define
$g_i=\vec A\cdot\vec e_i$. Then

$$
\begin{pmatrix}g_1\\g_2\end{pmatrix}
=
\begin{pmatrix}
\vec e_1\cdot\vec e_1 & \vec e_2\cdot\vec e_1\\
\vec e_1\cdot\vec e_2 & \vec e_2\cdot\vec e_2
\end{pmatrix}
\begin{pmatrix}c_1\\c_2\end{pmatrix}.
$$

The matrix is the Gram matrix. Its off-diagonal entries record the lack of
perpendicularity. Solving this system gives components without treating the dot
products as though they were independent projections.

For example, take
$\vec e_1=(1,0)$, $\vec e_2=(0.8,0.6)$, and $\vec A=(2,1)$. The Gram
matrix and dot-product column are

$$
G=
\begin{pmatrix}1&0.8\\0.8&1\end{pmatrix},
\qquad
\vec g=
\begin{pmatrix}2\\2.2\end{pmatrix}.
$$

Solving $G\vec c=\vec g$ gives
$c_1=0.667$ and $c_2=1.667$. Direct substitution gives

$$
0.667(1,0)+1.667(0.8,0.6)\simeq(2,1).
$$

Rounding accounts for the small displayed difference. The calculation also gives a
independent check for any component solver: reconstruct the physical vector from the
reported coefficients and compare it with the original vector in fixed Cartesian
coordinates.

Near-parallel bases require special care in measurement and simulation. A narrow
camera baseline, two nearly aligned strain gauges, or two nearly collinear force
directions can all generate a poorly conditioned component estimate. State the
included angle or the condition number of the basis matrix, retain measurement
covariances when they are known, and avoid reporting many digits in the unstable
components. Replacing a poorly conditioned basis with an orthonormal one can make
the calculation stable without changing the vector being described.

**Scalar triple product and volume.**

The scalar triple product is

$$
\vec A\cdot(\vec B\times\vec C)
=\begin{vmatrix}
A_x&A_y&A_z\\B_x&B_y&B_z\\C_x&C_y&C_z
\end{vmatrix}.
$$

Its magnitude is the volume of the parallelepiped spanned by three vectors. A zero
value means the vectors are coplanar. Cyclic permutations preserve the value,

$$
\vec A\cdot(\vec B\times\vec C)
=\vec B\cdot(\vec C\times\vec A),
$$

whereas interchange of two vectors reverses its sign. The result gives an
orientation test in three-dimensional geometry and appears in torque and volume
calculations.

**Deriving a planar coordinate transformation.**

Let a primed $x$ axis be rotated counterclockwise by $\phi$ from the unprimed
$x$ axis. Its unit vector is

$$
\hat{\imath}'=\cos\phi\,\hat{\imath}+\sin\phi\,\hat{\jmath}.
$$

The primed component of a fixed vector is the projection

$$
A_x'=\vec A\cdot\hat{\imath}'
=A_x\cos\phi+A_y\sin\phi.
$$

The perpendicular primed unit vector gives

$$
A_y'=-A_x\sin\phi+A_y\cos\phi.
$$

The transformation matrix has determinant one and preserves the dot product. It
therefore preserves lengths and angles. The inverse is its transpose, equivalent to
replacing $\phi$ with $-\phi$. These properties distinguish a rotation from a
general coordinate scaling or shear.

$$
% caption: Rotating the axes by phi changes the components of A but not the arrow itself; magnitude and dot products are invariant.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[->, black] (0,0) -- (4.8,0) node[right] {x};
  \draw[->, black] (0,0) -- (0,3.7) node[above] {y};
  \draw[->, acc, thick] (0,0) -- (4.35,2.03) node[right] {x prime};
  \draw[->, acc, thick] (0,0) -- (-1.56,3.35) node[above left] {y prime};
  \draw[->, black!70, very thick] (0,0) -- (3.6,2.9) node[above] {A};
  \draw[acc] (1.3,0) arc (0:25:1.3);
  \node[acc, anchor=west] at (1.35,0.33) {phi};
\end{tikzpicture}
$$

> **Worked example (Resultant of three forces on a ring).** Three forces act on a
> ring: $\vec F_1=(80,0)\ \mathrm N$, $\vec F_2=(-30,50)\ \mathrm N$, and
> $\vec F_3=(0,-40)\ \mathrm N$. Adding componentwise,
>
> $$
> \vec F_{\rm net}=(50,10)\ \mathrm N,\qquad
> F_{\rm net}=\sqrt{50^2+10^2}=51.0\ \mathrm N.
> $$
>
> The signs place the resultant in the first quadrant, so its direction is
> $\tan^{-1}(10/50)=11.3^\circ$ above the positive $x$ axis. Equilibrium requires a
> fourth force $-\vec F_{\rm net}=(-50,-10)\ \mathrm N$.

> **Worked example (Torque from a transverse force).** A force
> $\vec F=(0,25,0)\ \mathrm N$ acts at $\vec r=(0.40,0,0)\ \mathrm m$ from a pivot.
> The torque is
>
> $$
> \vec\tau=\vec r\times\vec F=(0,0,10.0)\ \mathrm{N\,m},
> $$
>
> directed along $+z$ by the right-hand rule. Moving the same force to
> $\vec r=(0,0.40,0)\ \mathrm m$ makes its line of action radial, and the cross
> product vanishes. Force magnitude and radius alone do not fix the torque; the
> included angle does.

**Polar-coordinate derivatives.**

The polar basis changes direction as the angle changes. Its derivatives are

$$
\frac{\d\hat{r}}{\d t}=\dot\theta\hat{\theta},
\qquad
\frac{\d\hat{\theta}}{\d t}=-\dot\theta\hat{r}.
$$

For $\vec r=r\hat{r}$, differentiation gives

$$
\vec v=\dot r\hat{r}+r\dot\theta\hat{\theta},
$$

$$
\vec a=(\ddot r-r\dot\theta^2)\hat{r}
+(r\ddot\theta+2\dot r\dot\theta)\hat{\theta}.
$$

Uniform circular motion has $\dot r=\ddot r=\ddot\theta=0$, leaving the inward
term $-r\dot\theta^2\hat{r}$. The result follows from changing basis
direction, not from a change in the speed coefficient.

$$
% caption: The polar basis rotates with position; radial and tangential directions differ from point to point, so their scalar coefficients are not fixed Cartesian components.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \draw[black] (0,0) circle (2.0);
  \draw[fill=white, draw=black, thick] (0,0) circle (2pt);
  \fill[acc] (1.414,1.414) circle (2pt);
  \draw[->, acc, thick] (1.414,1.414) -- (2.26,2.26) node[above right] {radial};
  \draw[->, black, thick] (1.414,1.414) -- (0.71,2.12) node[above left] {tangent};
  \fill[acc] (-1.732,-1.0) circle (2pt);
  \draw[->, acc, thick] (-1.732,-1.0) -- (-2.6,-1.5);
  \draw[->, black, thick] (-1.732,-1.0) -- (-1.23,-1.87);
\end{tikzpicture}
$$

## Vector functions and mechanics

A vector-valued function carries a component at each time:

$$
\vec A(t)=A_x(t)\hat{\imath}
+A_y(t)\hat{\jmath}
+A_z(t)\hat{k}.
$$

In a fixed Cartesian basis, differentiation and integration act component by
component. The derivative is

$$
\frac{\d \vec A}{\d t}
=\frac{\d A_x}{\d t}\hat{\imath}
+\frac{\d A_y}{\d t}\hat{\jmath}
+\frac{\d A_z}{\d t}\hat{k}.
$$

The derivative carries the units of $\vec A$ divided by time. Position
$\vec r(t)$ gives velocity $\vec v=\d \vec r/\d t$ and
acceleration $\vec a=\d \vec v/\d t$. A velocity can change
while its magnitude stays constant because a vector records direction as well as
size. Uniform circular motion is the standard example: the speed is constant, but
the velocity derivative points inward.

Scalar-vector products require the product rule. If a time-dependent scalar
$f(t)$ multiplies a time-dependent vector $\vec A(t)$, then

$$
\frac{\d}{\d t}\bigl(f\vec A\bigr)
=\frac{\d f}{\d t}\vec A
+f\frac{\d \vec A}{\d t}.
$$

The first term changes the magnitude supplied by $f$; the second changes the vector
itself. Dropping either term gives incorrect acceleration for polar coordinates,
rotating machine parts, and any force written as a time-varying scalar times a
changing direction.

The dot product gives a compact test for changes in magnitude. Differentiate
$\vec A\cdot\vec A=A^2$:

$$
2\vec A\cdot\dot{\vec A}
=2A\dot A,
\qquad
\dot A=\frac{\vec A\cdot\dot{\vec A}}{A}
\quad(A\ne0).
$$

Only the component of $\dot{\vec A}$ parallel to $\vec A$ changes the
magnitude. A perpendicular derivative turns the vector without stretching it. For a
unit vector $\hat{e}$, this relation becomes

$$
\hat{e}\cdot\frac{\d \hat{e}}{\d t}=0.
$$

The derivative of a unit direction is therefore perpendicular to that direction.
The identity supplies the radial and tangential basis derivatives used in circular
motion. It also provides a numerical check: a computed derivative of a unit
orientation should have a negligible component along the orientation itself.

Relative vectors must keep their point order visible. The position of particle $P$
relative to particle $Q$ is

$$
\vec r_{P/Q}=\vec r_P-\vec r_Q.
$$

Differentiation gives

$$
\vec v_{P/Q}=\vec v_P-\vec v_Q,
\qquad
\vec a_{P/Q}=\vec a_P-\vec a_Q.
$$

The order reverses the sign. A closing-speed calculation requires the component of
$\vec v_{P/Q}$ along the line joining the particles, whereas the full relative
velocity determines the changing line-of-sight direction. Treating a scalar speed
difference as a relative velocity is valid only when both velocities lie on the
same line with an explicitly declared sign convention.

Measured motion is sampled rather than differentiated analytically. A forward
difference,

$$
\vec v(t_i)\simeq
\frac{\vec r(t_{i+1})-\vec r(t_i)}{t_{i+1}-t_i},
$$

gives an average velocity over an interval. A central difference,

$$
\vec v(t_i)\simeq
\frac{\vec r(t_{i+1})-\vec r(t_{i-1})}{t_{i+1}-t_{i-1}},
$$

is usually a better estimate at an interior timestamp when the samples are evenly
spaced and the trajectory is smooth. Position noise is amplified by division by a
small time interval. Increasing the camera frame rate reduces discretization error
but may magnify the effect of pixel-level position noise unless the position record
is smoothed or fit by a physically justified trajectory.

Consider a cart whose measured positions at equal time intervals are
$(0.00,0.00)$, $(0.48,0.12)$, and $(0.92,0.31)\ \mathrm m$. The central
displacement across the first and third samples is $(0.92,0.31)\ \mathrm m$.
Dividing by the elapsed two-interval time gives the velocity estimate at the middle
sample. Reporting only the magnitude discards the direction needed to compare the
result with a force or track orientation. Retain the component estimate and its
position-scale and timestamp uncertainties until the physical model specifies the
quantity to be inferred.

**Vector identities in mechanics.**

The distributive and scalar-multiplication rules follow from component algebra:

$$
\vec A\cdot(\vec B+\vec C)=\vec A\cdot\vec B
+\vec A\cdot\vec C,
$$

$$
\vec A\times(\vec B+\vec C)=\vec A\times\vec B
+\vec A\times\vec C.
$$

The first relation resolves the work of a net force into individual-force works.
The second resolves torque from a force sum. Neither operation is associative:
$\vec A\times(\vec B\times\vec C)$ is a vector in the plane of
$\vec B$ and $\vec C$, not generally the same as
$(\vec A\times\vec B)\times\vec C$. Parentheses are part of the
mathematical statement.

The vector triple-product identity is

$$
\vec A\times(\vec B\times\vec C)
=\vec B(\vec A\cdot\vec C)
-\vec C(\vec A\cdot\vec B).
$$

It converts a nested cross product into vectors in the original plane. The formula
simplifies magnetic-force and rigid-body expressions, but its order
must be retained exactly.

| Operation | Output | Geometric content | Mechanics use |
| --- | --- | --- | --- |
| $\vec A+\vec B$ | vector | diagonal of a component sum | net force, displacement |
| $\vec A\cdot\vec B$ | scalar | parallel projection | work, power |
| $\vec A\times\vec B$ | vector | oriented area normal | torque, angular momentum |
| $\vec A\cdot(\vec B\times\vec C)$ | scalar | oriented volume | coplanarity test |

**Constraint-based decomposition.**

An axis choice follows the physical constraint rather than a drawing convention.
An incline-constrained block uses axes parallel and normal to the surface to
separate zero normal acceleration from possible tangential acceleration. A pendulum
uses radial and tangential axes to separate string tension from the force that
changes speed. A projectile uses horizontal and vertical axes, which make the
acceleration components independent in the constant-gravity approximation.

The same vector can be decomposed in different bases, but a calculation must keep
one basis through each component equation. Combining a horizontal component from
one line with a radial component from another has no defined vector meaning. A
negative component is a result about direction, not a failure of the chosen axes.

> **Worked example (Force resolved along an incline).** A $100\ \mathrm N$ force
> acts at $25^\circ$ above the horizontal, on an incline that itself rises
> $15^\circ$ above the horizontal. The force makes an angle
> $25^\circ-15^\circ=10^\circ$ with the incline surface, so the components along and
> normal to the surface are
>
> $$
> F_{\parallel}=100\cos 10^\circ=98.5\ \mathrm N,\qquad
> F_{\perp}=100\sin 10^\circ=17.4\ \mathrm N.
> $$
>
> Projecting with $25^\circ$ would give components along horizontal axes, not the
> incline-aligned components the constraint requires. The geometry fixes which angle
> enters each projection.

$$
% caption: Axes chosen along and normal to the incline resolve the applied force into the components the constraint and motion equations use.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \fill[black] (0.2,0.3) -- (5.6,0.3) -- (5.6,2.5) -- cycle;
  \draw[black, thick] (0.2,0.3) -- (5.6,0.3) -- (5.6,2.5) -- cycle;
  \coordinate (P) at (3.2,1.52);
  \fill[black] (P) circle (1.6pt);
  \draw[->, acc, very thick] (P) -- ($(P)+(0.6,1.4)$) node[above] {T};
  \draw[->, black, thick] (P) -- ($(P)+(1.004,0.409)$) node[below right] {parallel};
  \draw[->, black, thick] (P) -- ($(P)+(-0.403,0.991)$) node[above left] {normal};
  \draw[dashed, black] ($(P)+(1.004,0.409)$) -- ($(P)+(0.6,1.4)$);
  \draw[dashed, black] ($(P)+(-0.403,0.991)$) -- ($(P)+(0.6,1.4)$);
\end{tikzpicture}
$$

## Verification and computational practice

Component equations inherit the units of the original vector. A force component
has units of newtons; a displacement component has units of metres. Trigonometric
functions are dimensionless, so resolving a vector cannot change its units. The
reconstruction check

$$
A^2=A_x^2+A_y^2+A_z^2
$$

is available only for orthogonal Cartesian components. In a rotated orthonormal
basis it remains valid with primed components; in a skew basis the Gram matrix is
required. Geometrically, a computed component must not exceed the vector magnitude
in an orthonormal projection. A larger value indicates an incorrect angle or a
non-unit direction vector.

> **Worked example (Cross-product magnitude and its units).** Two forces of
> magnitude $30\ \mathrm N$ and $40\ \mathrm N$ meet at an included angle
> $60^\circ$. Their cross-product magnitude is
>
> $$
> |\vec F_1\times\vec F_2|=(30)(40)\sin 60^\circ=1.04\times10^3\ \mathrm{N^2}.
> $$
>
> The unit $\mathrm{N^2}$ marks this as not a torque: torque is a position crossed
> with a force and carries $\mathrm{N\,m}$. As the forces approach parallel, the
> $\sin$ factor drives the product to zero even with both magnitudes nonzero. The
> direction is normal to their plane and reverses with the factor order.

Vector algebra keeps three geometric operations distinct. Addition combines directed
changes, projection selects an aligned component, and the cross product measures
oriented nonparallel content. Mechanics equations retain those distinctions;
substituting a magnitude relation for a vector relation removes direction information
needed for the physical conclusion.

**Checks.**

Vector equations require matching physical dimensions. Forces add to forces;
displacement cannot be added to force. A component result should reproduce the
original magnitude through Pythagoras. A zero dot product tests perpendicularity;
a zero cross product tests parallel or antiparallel vectors. These checks locate
sign, angle, and coordinate errors before numerical results are interpreted.

**Computational practice.**

Numerical vector work should retain components until the final reporting step.
Roundoff in intermediate magnitudes and angles can destroy cancellations between
large nearly opposite components. A computational implementation benefits from
separate vector, scalar-product, and cross-product operations rather than a generic
array calculation with implicit meaning. Unit tests should include perpendicular
vectors, parallel vectors, and a known right-handed Cartesian basis. Those cases
check sign convention, orientation, and the order sensitivity of cross products.

## Uncertainty and conditioning

Vector subtraction can amplify measurement uncertainty when nearly equal vectors
are subtracted. If two measured forces have large common horizontal components, the
small net horizontal component is obtained from a difference of large quantities.
Its relative uncertainty can be much larger than the relative uncertainty of either
individual force. Reporting the component measurements and their directions is then
more informative than reporting only a rounded resultant magnitude.

The same issue appears in angle calculations near an axis. The relation

$$
\theta=\atanTwo(A_y,A_x)
$$

is preferable to a bare inverse tangent because it retains the signs of both
components and identifies the correct quadrant. When $A_x$ and $A_y$ are both
small, direction is poorly determined even if the formula returns a number; the
vector magnitude must be compared with measurement resolution.

**Magnitude and angle uncertainty.**

Component uncertainties propagate into a magnitude through the local derivatives.
For uncorrelated Cartesian components,

$$
\sigma_A^2=
\left(\frac{A_x}{A}\right)^2\sigma_x^2+
\left(\frac{A_y}{A}\right)^2\sigma_y^2+
\left(\frac{A_z}{A}\right)^2\sigma_z^2.
$$

The coefficients are direction cosines. A component that contributes little to the
vector magnitude contributes little to its first-order magnitude uncertainty. This
does not imply that the same component is unimportant for direction. Angular
uncertainty becomes large when the vector magnitude is small because a fixed
component error can then rotate the direction substantially.

In a plane, a small component change gives

$$
\d \theta=
\frac{A_x\,\d A_y-A_y\,\d A_x}
{A_x^2+A_y^2}.
$$

Independent errors give the variance

$$
\sigma_\theta^2=
\frac{A_y^2\sigma_x^2+A_x^2\sigma_y^2}
{(A_x^2+A_y^2)^2}.
$$

The angle is measured in radians in this propagation formula. Convert to degrees
only after computing the uncertainty. A calculator can return a stable numerical
angle near the origin even when the physical direction is unresolved; the
uncertainty expression exposes that limitation.

For example, suppose a force measurement gives
$A_x=3.00\pm0.05\ \mathrm N$ and
$A_y=4.00\pm0.08\ \mathrm N$, with independent component errors. The magnitude is
$A=5.00\ \mathrm N$. The propagated standard uncertainty is

$$
\sigma_A=
\sqrt{(3/5)^2(0.05)^2+(4/5)^2(0.08)^2}
=0.071\ \mathrm N.
$$

The direction is $\theta=\atanTwo(4,3)=53.1^\circ$. The angle standard uncertainty
is $0.0125\ \mathrm{rad}$, or $0.72^\circ$. Reporting
$5.00\pm0.07\ \mathrm N$ at $53.1\pm0.7^\circ$ preserves both the scale and the
orientation uncertainty. Reporting a magnitude alone would conceal the directional
resolution needed for a free-body or trajectory calculation.

Independent-error formulas are insufficient when the same instrument or calibration
affects multiple components. Let the component covariance matrix be

$$
C=
\begin{pmatrix}
\sigma_x^2&\cov(A_x,A_y)\\
\cov(A_y,A_x)&\sigma_y^2
\end{pmatrix}.
$$

The variance of any scalar quantity $f(A_x,A_y)$ is, to first order,

$$
\sigma_f^2=(\nabla f)^{\mathsf T}C(\nabla f).
$$

Positive covariance can reduce the uncertainty of a difference and increase the
uncertainty of a sum; negative covariance has the opposite effect. A common zero
offset in two position readings is a simple example. It largely cancels from a
displacement, so treating the two readings as independent overstates the
displacement uncertainty.

**Coordinate reconstruction from measured directions.**

Many instruments measure projections rather than Cartesian components. A strain
gauge reports extension along its own axis. A photodetector measures a line-of-sight
projection. A force transducer mounted on a sloping bracket measures the force along
one mechanical direction. If unit measurement directions are
$\hat{n}_1,\ldots,\hat{n}_m$ and the recorded scalar projections
are $b_i$, the ideal relation is

$$
b_i=\hat{n}_i\cdot\vec A.
$$

Two nonparallel directions determine a planar vector in the absence of noise.
Parallel directions cannot separate the two Cartesian components. With more
measurements than unknown components, solve a weighted least-squares system and
inspect residuals. Large residuals indicate a changing vector, a direction
calibration error, sensor nonlinearity, or an uncertainty model that is too small.

The geometry of the measurement directions controls the reconstruction quality.
Two directions separated by nearly ninety degrees give a well-conditioned planar
estimate. Two directions separated by a few degrees produce nearly the same
projection and leave the perpendicular component weakly constrained. The same
conditioning issue appears in a graphical construction: the intersection of two
nearly parallel component lines moves a long distance when either line is shifted
slightly.

Coordinate transformations must carry the uncertainty information. If a rotation
matrix $R$ changes components according to $\vec A'=R\vec A$, then

$$
C'=RCR^{\mathsf T}.
$$

The vector magnitude and the physical uncertainty ellipse remain unchanged, but the
reported component standard deviations and covariance generally change. A rotated
coordinate system can make components easier to interpret while concealing a
correlation if only the diagonal entries are copied into a report.

Before combining vector data, record the origin, axis directions, handedness, angle
units, time basis, sensor orientation, and whether coordinates describe the object,
the observer, or a moving platform. These are model inputs. A sign convention
written only on a diagram is easily lost when values are transferred to a table,
spreadsheet, or program. The final reconstruction should include a forward check:
substitute the reported vector into every original projection equation and compare
the predicted readings with the measured values and their stated uncertainty.

The reconstruction record has three distinct objects: observations, a coordinate
map, and a residual test. Keeping them in separate columns prevents a transformed
component from being mistaken for a direct sensor reading.

| Record | Mathematical form | Independent check |
| --- | --- | --- |
| Projection reading | $b_i=\hat{n}_i\cdot\vec A$ | compare predicted and measured $b_i$ |
| Component transformation | $\vec A'=R\vec A$ | apply the inverse map |
| Covariance transformation | $C'=RCR^{\mathsf T}$ | preserve the physical uncertainty ellipse |

**Auditing a vector reconstruction.**

A reproducible vector calculation separates geometric data from arithmetic. Record
the coordinate frame before entering components: origin, positive axes, handedness,
and the units assigned to every coordinate. Give a direction as either a unit vector
or a pair of angles with their reference axes and rotation senses. A statement such
as “the force is at $30^\circ$” is incomplete until the reference direction and the
positive rotational sense are stated. The same number can describe different vectors
when measured from the positive $x$ axis, from a slope, or clockwise from north.

Keep a measurement vector and a model vector distinct. A camera may report pixel
coordinates that must first be mapped through a scale, lens correction, and image
rotation. A load cell may report a local bracket component that must be rotated into
laboratory axes. A simulation may store body-fixed components while its equations
require inertial components. Combining these numbers before their frames are
converted gives an array of plausible values with no defined vector operation.

Matrix order deserves explicit checking. With column vectors, an active rotation
$R_2$ applied after $R_1$ is written $R_2R_1\vec A$. The rightmost operation
acts first. Planar rotations about the same origin commute, but rotations about
different three-dimensional axes generally do not. A program that changes from a
sensor frame to a platform frame and then to a laboratory frame must retain that
ordered chain in both code and documentation. Reversing the order can preserve
vector magnitudes while sending components into the wrong physical direction.

Retain the ordered frame chain with the quantity being transformed. The same numerical
matrix can represent an active turn or a passive basis conversion, so the check must
name which coordinates are fixed.

| Step | Column-vector operation | Check |
| --- | --- | --- |
| Sensor to platform | $\vec A_P=R_{P/S}\vec A_S$ | sensor axes and handedness |
| Platform to laboratory | $\vec A_L=R_{L/P}\vec A_P$ | documented matrix order |
| Reverse conversion | $\vec A_S=R_{P/S}^{-1}R_{L/P}^{-1}\vec A_L$ | recover stored sensor components |

Normalize direction vectors only when their length is resolved. For a measured
vector $\vec u$, form $\hat{u}=\vec u/|\vec u|$ only after
checking that $|\vec u|$ exceeds the measurement resolution. Normalizing a
noise-dominated vector creates an arbitrary direction with unit magnitude. This
failure is common when a small difference between two large positions is used to
define a line of motion. Report the displacement uncertainty and the threshold used
to accept a direction estimate.

Several checks apply to a completed transformation:

- **Units:** Rotation matrices and unit-vector components are dimensionless. A
  translation has the units of position. A matrix product that adds quantities with
  unlike dimensions is invalid before any numerical evaluation.

- **Norm:** An orthogonal rotation preserves $|\vec A|$. A change in norm after a
  purported rotation indicates scaling, roundoff accumulation, or a nonorthogonal
  matrix.

- **Orientation:** The determinant of a proper rotation is $+1$. A determinant of
  $-1$ describes a reflection combined with a rotation and reverses handedness.

- **Inverse:** Applying the inverse frame transformation must recover the original
  component column within the error expected from numerical precision and measured
  calibration constants.

- **Physical projection:** Each transformed vector should reproduce an independent
  observation, such as a force component along a rail, a sensor line of sight, or a
  displacement between two surveyed marks.

The checks are complementary. A reflected vector can preserve a norm and pass an
inverse check if the same mistaken reflection is used twice; its handedness or an
external projection then exposes the error. A component table should therefore
contain the vector name, frame label, units, component values, uncertainty or
precision, and the transformation that produced the row. That record prevents a
later calculation from treating a body-fixed torque, an inertial velocity, and a
geographic position as if they shared one Cartesian basis.

Vector equations also benefit from limiting cases. Set a rotation angle to zero and
recover the identity matrix. Set two vectors parallel and require their cross product
to vanish. Set them perpendicular and require their dot product to vanish. Set one
component to zero and verify that an angle routine returns the correct axis and
quadrant. These tests should use signed component values. Magnitudes discard
quadrant information and can conceal sign errors.

Keep the unrounded component record until the final result is reported. Rounding an
angle before reconstructing components can shift a small perpendicular component by
more than its stated uncertainty. In a closed displacement polygon, sum the stored
components before rounding individual arrows. In a force balance, compare the
component residual with the uncertainty of every applied force. A residual reported
as exactly zero after premature rounding conveys less information than a small,
quantified residual tied to the measurement resolution and the declared coordinate
frame.

State whether reported component uncertainty is a standard deviation, a confidence
interval, or an instrument tolerance. Those labels determine how residual tests and
subsequent uncertainty propagation should be interpreted.

## Reference frames and final audit

Coordinates and vector components are frame-dependent descriptions. A rotation of
axes changes component values through an orthogonal transformation but leaves the
geometrical vector unchanged. A change between inertial frames in mechanics also
changes the measured velocity vector by the frame velocity. Position displacement
and force use the same vector algebra, but their physical transformation laws and
dimensions remain distinct. This distinction prevents an algebraically correct
component operation from being applied to incompatible physical quantities.

**Final audit of a vector calculation.**

Record the basis, write each vector in components, perform the required vector
operation, and reconstruct magnitude and direction only at the end. The result
should satisfy geometric limits: a parallel cross product vanishes, a perpendicular
dot product vanishes, and a zero resultant closes the head-to-tail polygon.
Dimensional checks, component signs, and limiting geometries provide independent
tests of the same calculation.

Inverse rotation is a coordinate check as well as a geometric operation. After a
component column is expressed in rotated axes, transforming it back with the inverse
matrix must recover the original column within rounding tolerance. For an orthonormal
rotation, transpose and inverse are the same matrix, but their roles remain distinct:
the transpose converts components in the reverse direction, while applying the
forward rotation again represents another active turn of the vector.

Numerical orthogonality should be tested rather than assumed from printed entries.
Compute the dot product of the rotated basis vectors and compare each basis-vector
norm with one. Small deviations arise from rounded sines and cosines, finite
precision, or accumulated matrix products. A large deviation signals an incorrect
matrix order, a degree-radian mismatch, or a transformation that includes scaling or
shear. Reorthogonalization may be necessary after many sequential rotations in a
simulation, especially when basis vectors are propagated from measured data.


An active rotation moves the geometric vector while the coordinate axes remain fixed.
A passive rotation leaves the geometric vector fixed and rotates the axes used to
label its components. The two descriptions use inverse component matrices. Applying
an active rotation matrix to a column already expressed in rotated coordinates turns
the vector a second time. State which object and axes are fixed, and state whether
component columns are being converted between bases or used for a physical rotation.
Record the reference direction and rotation sense beside the matrix. A sign convention
buried only in a sketch is easily lost when component columns move into code or a
data table.


[^tipler16]: Tipler and Mosca, _Physics for Scientists and Engineers_, 6th ed., §§1-6–1-7.
