Vectors: Difference between revisions
JohnWasHere (talk | contribs) Fixed a slight discrepancy in the component form explanation. |
|||
| (23 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
''' | '''John Yang -- Fall 2026''' | ||
==Introduction== | |||
Vectors and units are used for precisely describing the physical world. A vector in introductory physics can be thought of as a quantity that has both '''magnitude''' (how big) and '''direction''' (which way). Many important physical quantities are vectors: displacement, velocity, acceleration, and force all need both size and direction to be specified. By representing these quantities as vectors, we can keep track of how they interact. | |||
Units, meanwhile, tell us what we are measuring. A number by itself has no physical meaning until we attach a unit such as meters (m), seconds (s), or newtons (N). Consistent use of units helps us spot mistakes, compare results, and communicate clearly. Together, vectors and units allow scientists, engineers, and programmers to build models and make inferences and predictions for real-world behavior and to do computations that are physically meaningful. | |||
In physics and engineering, vectors show up whenever we track motion, balance forces, or work with fields such as electric and magnetic fields. In computer science and related fields, vectors appear in computer graphics, simulations, game physics, machine learning, and data representation. Units give meaning to these values and ensure that all of these computations line up with real measurements. A strong grasp of both vectors and units is essential for problem solving, interpreting relations, and understanding of physics in general. | |||
[[File:wikivector.png]] | |||
===Notation Conventions=== | |||
== | |||
Introductory physics and pure mathematics often write the same vector concepts differently. Because this article bridges introductory physics and formal linear algebra, the table below summarizes both conventions and states the standard used on this page: | |||
{| class="wikitable" | |||
= | ! Concept !! Linear Algebra !! Introductory Physics !! Convention in This Article | ||
|- | |||
| Vector || <math>v</math> (plain italic; distinguished by context) || <math>\vec{v}</math>, <math>\mathbf{v}</math>, or <math>\overrightarrow{AB}</math> || <math>v</math> in abstract definitions; <math>\vec{v}</math> in physics and <math>\mathbf{R}^3</math> | |||
|- | |||
| Coordinate tuple (vector in <math>\mathbf{R}^3</math>) || <math>(v_x, v_y, v_z)</math> || <math>\langle v_x, v_y, v_z \rangle</math> or <math>(v_x, v_y, v_z)</math> || <math>(v_x, v_y, v_z)</math> | |||
|- | |||
| Inner product (dot product) || <math>\langle u, v \rangle</math> || <math>\vec{u} \cdot \vec{v}</math> || <math>\langle u, v \rangle</math> (and <math>\vec{u} \cdot \vec{v}</math> in <math>\mathbf{R}^n</math>) | |||
|- | |||
| Norm (magnitude) || <math>\|v\|</math> || <math>|\vec{v}|</math>, <math>v</math>, or <math>\|\vec{v}\|_2</math> || <math>\|v\|</math> or <math>\|\vec{v}\|</math> | |||
|- | |||
| Unit vector || <math>u</math> with <math>\|u\| = 1</math> || <math>\hat{v}</math>; standard basis <math>\hat{i}, \hat{j}, \hat{k}</math> or <math>\hat{x}, \hat{y}, \hat{z}</math> || <math>\hat{v}</math> and <math>\hat{i}, \hat{j}, \hat{k}</math> (or <math>\hat{x}, \hat{y}, \hat{z}</math>) | |||
|} | |||
'''Important note on angle brackets (<math>\langle \cdot, \cdot \rangle</math>):''' Many introductory physics textbooks and computational tools (including VPython's printed output) write coordinate vectors using angle brackets, such as <math>\vec{v} = \langle 3, -1, 2 \rangle</math>, to visually separate vectors from points <math>(3, -1, 2)</math>. In mathematics and nonintroductory physics, however, this is an '''abuse of notation''': angle brackets <math>\langle u, v \rangle</math> are reserved for the '''inner product''' of two vectors, which outputs a scalar rather than a vector. Writing both <math>\vec{v} = \langle v_x, v_y \rangle</math> and <math>\langle u, v \rangle</math> in the same setting creates ambiguity (especially in 2D, where both take two entries). To be unambiguous, this article strictly uses '''parentheses''' <math>(v_x, v_y, v_z)</math> for coordinate tuples and '''angle brackets''' <math>\langle u, v \rangle</math> exclusively for inner products. | |||
===Physical Examples and Visual Representation=== | |||
====Position and Displacement==== | |||
A point's location in 3D space is described by a '''position vector''' <math>\vec{r} \in \mathbf{R}^3</math> measured from a chosen origin <math>(0, 0, 0)</math>. Because position depends on where the origin is placed, a position vector is always anchored to a reference point. Given two position vectors <math>\vec{r}_1</math> and <math>\vec{r}_2</math>, their difference | |||
<math>\Delta \vec{r} = \vec{r}_2 - \vec{r}_1</math> | |||
is the '''relative position''' (or '''displacement''') vector pointing from point 1 to point 2. Unlike position itself, displacement is independent of the choice of origin, and its norm <math>\|\vec{r}_2 - \vec{r}_1\|</math> equals the straight-line Euclidean distance between the two points. | |||
== | ====Velocity==== | ||
'''Velocity''' is a vector that describes how fast and in what direction an object moves. Its magnitude is the '''speed''', and it is usually measured in m/s. The velocity vector can be found by differentiating the position vector with respect to time (if the position function is differentiable, that is). | |||
<math>\vec{v}(t) = \frac{d\vec{r}}{dt}</math> | |||
For example, if <math>\vec{r}(t) = (t, 1, 0)\ \text{m}</math>, then: | |||
<math>\vec{v}(t) = \frac{d\vec{r}}{dt} = (1, 0, 0)\ \text{m/s}</math> | |||
The speed is the norm <math>\|\vec{v}(t)\| = \sqrt{1^2 + 0^2 + 0^2} = 1\ \text{m/s}</math>. | |||
[[File:Velwiki.png]] | |||
====Weight==== | |||
Near Earth's surface, gravity exerts a downward force vector <math>\vec{F}_g</math> on an object of mass <math>m > 0</math>. Choosing a coordinate system with the positive <math>y</math>-axis pointing upward, | |||
= | <math>\vec{F}_g = (0, -mg, 0)</math> | ||
where <math>g \approx 9.8\ \text{m/s}^2</math> is the magnitude of the gravitational field near Earth’s surface. '''Weight''' refers to the norm <math>\|\vec{F}_g\| = mg</math> whereas <math>\vec{F}_g</math> is the gravitational force vector. | |||
== | ====Visualizing Vectors==== | ||
In <math>\mathbf{R}^2</math> and <math>\mathbf{R}^3</math>, vectors are drawn as '''arrows''': the length of the arrow represents the norm, and the direction of the arrow indicates which way it points. Mathematically, vectors in <math>\mathbf{R}^n</math> are invariant under parallel translation: sliding an arrow without changing its length or orientation produces the same vector. In physics, this invariance is useful because a vector does not always represent a literal displacement between two locations. It often describes a physical property defined at a single point (such as velocity, force, or an electric field). In diagrams, we anchor the tail of such a vector at the point where it acts. | |||
The example below shows a velocity vector for a ball moving to the right at 5 m/s. | |||
[[File:Vectorvisualrepresentation.png]] | |||
==Units and Measurement== | |||
===SI Base Units=== | |||
The '''International System of Units (SI)''' is the standard measurement system in science and engineering. It defines seven base units from which all other SI units are constructed: | |||
* '''meter''' (<math>\text{m}</math>) – length | |||
* '''kilogram''' (<math>\text{kg}</math>) – mass | |||
* '''second''' (<math>\text{s}</math>) – time | |||
* '''ampere''' (<math>\text{A}</math>) – electric current | |||
* '''kelvin''' (<math>\text{K}</math>) – thermodynamic temperature | |||
* '''mole''' (<math>\text{mol}</math>) – amount of substance | |||
* '''candela''' (<math>\text{cd}</math>) – luminous intensity | |||
All vector quantities in introductory physics carry combinations of these base units. | |||
===Derived Units=== | |||
'''Derived units''' are formed by combining SI base units through multiplication and division. Common examples include: | |||
* '''newton''' (<math>\text{N} = \text{kg}\cdot\text{m/s}^2</math>) – force | |||
* '''joule''' (<math>\text{J} = \text{N}\cdot\text{m} = \text{kg}\cdot\text{m}^2/\text{s}^2</math>) – energy and work | |||
* '''watt''' (<math>\text{W} = \text{J/s}</math>) – power | |||
* '''tesla''' (<math>\text{T} = \text{N}\cdot\text{s}/(\text{C}\cdot\text{m}) = \text{kg}/(\text{A}\cdot\text{s}^2)</math>) – magnetic field | |||
===Unit Conversion and Dimensional Consistency=== | |||
'''Unit conversion''' changes a quantity from one unit to another while representing the same physical amount (for example, converting from centimeters to meters or from kilometers per hour to meters per second). In multi-step physics problems, careful unit conversion is essential to avoid errors and to match the units expected in formulas. In vector calculations, dimensional consistency requires that every coordinate of a vector shares the same unit. | |||
==Formal Definition== | |||
== | ===Vector Space Axioms=== | ||
Formally, a '''vector''' (or '''point''') is an element of a '''vector space'''. Let <math>\mathbf{F}</math> denote either the field of real numbers <math>\mathbf{R}</math> or the field of complex numbers <math>\mathbf{C}</math> (in introductory physics, <math>\mathbf{F} = \mathbf{R}</math>); elements of <math>\mathbf{F}</math> are called '''scalars'''. | |||
A '''vector space''' over <math>\mathbf{F}</math> is a set <math>V</math> equipped with two operations: | |||
* '''Addition''' (<math>V \times V \to V</math>): assigns an element <math>u + v \in V</math> to each pair <math>u, v \in V</math>. | |||
<math> | * '''Scalar multiplication''' (<math>\mathbf{F} \times V \to V</math>): assigns an element <math>\lambda v \in V</math> to each <math>\lambda \in \mathbf{F}</math> and <math>v \in V</math>. | ||
=== | (Because both operations map back into <math>V</math>, closure under addition and scalar multiplication is built directly into the definition.) These operations must satisfy the following axioms for all <math>u, v, w \in V</math> and all <math>a, b \in \mathbf{F}</math>: | ||
* '''Commutativity:''' <math>u + v = v + u</math> | |||
* '''Associativity:''' <math>(u + v) + w = u + (v + w)</math> and <math>(ab)v = a(bv)</math> | |||
* '''Additive identity:''' There exists an element <math>0 \in V</math> (the '''zero vector''', distinct from the scalar <math>0 \in \mathbf{F}</math>) such that <math>v + 0 = v</math> | |||
* '''Additive inverse:''' For every <math>v \in V</math>, there exists <math>w \in V</math> such that <math>v + w = 0</math> | |||
* '''Multiplicative identity:''' <math>1v = v</math> | |||
* '''Distributivity:''' <math>a(u + v) = au + av</math> and <math>(a + b)v = av + bv</math> | |||
<math> \ | From these axioms, we can prove that the additive identity <math>0 \in V</math> is unique, every vector <math>v \in V</math> has a unique additive inverse denoted <math>-v</math>, and <math>(-1)v = -v</math> and <math>0v = 0</math> for every <math>v \in V</math> (do these as an exercise). | ||
In introductory physics, we almost always work in the real vector spaces <math>\mathbf{R}^2</math> (the plane) or <math>\mathbf{R}^3</math> (ordinary 3D space), which are special cases of <math>\mathbf{R}^n</math>—the set of all ordered lists of <math>n</math> real numbers, such as <math>v = (v_x, v_y, v_z) \in \mathbf{R}^3</math>, with coordinate-wise addition and scalar multiplication. For example, <math>v = (1, 0, 0) \in \mathbf{R}^3</math> is a vector of length <math>1</math> pointing along the positive <math>x</math>-axis. | |||
=== | ===Inner Products and Norms=== | ||
A general vector space does not necessarily include a notion of length or angle. To introduce geometry, we equip a real vector space <math>V</math> with an '''inner product''', which is a function assigning a real scalar <math>\langle u, v \rangle \in \mathbf{R}</math> to each pair <math>u, v \in V</math> such that, for all <math>u, v, w \in V</math> and <math>\lambda \in \mathbf{R}</math>: | |||
* '''Positive definiteness:''' <math>\langle v, v \rangle \ge 0</math>, with <math>\langle v, v \rangle = 0</math> if and only if <math>v = 0</math>. | |||
* '''Linearity in the first slot:''' <math>\langle u + w, v \rangle = \langle u, v \rangle + \langle w, v \rangle</math> and <math>\langle \lambda u, v \rangle = \lambda \langle u, v \rangle</math>. | |||
* '''Symmetry:''' <math>\langle u, v \rangle = \langle v, u \rangle</math> (which, combined with linearity in the first slot, also guarantees linearity in the second slot). | |||
A vector space equipped with an inner product is called an '''inner product space'''. In <math>\mathbf{R}^n</math>, the standard '''Euclidean inner product''' (which we call the '''dot product''') of <math>u = (u_1, \dots, u_n)</math> and <math>v = (v_1, \dots, v_n)</math> is defined by: | |||
<math>\langle u, v \rangle = u_1 v_1 + u_2 v_2 + \cdots + u_n v_n = \sum_{i=1}^{n} u_i v_i</math> | |||
From the inner product, we define the '''norm''' (commonly called '''magnitude''' in physics) of a vector <math>v \in \mathbf{R}^n</math> as the nonnegative scalar: | |||
<math>\|v\| = \sqrt{\langle v, v \rangle} = \sqrt{v_1^2 + v_2^2 + \cdots + v_n^2} = \sqrt{\sum_{i=1}^{n} v_i^2}</math> | |||
In 3D Cartesian space, for <math>v = (v_x, v_y, v_z) \in \mathbf{R}^3</math>, this is the familiar Pythagorean formula: | |||
<math>\|v\| = \sqrt{v_x^2 + v_y^2 + v_z^2}</math> | |||
====Unit | ====Unit Vectors==== | ||
A '''unit vector''' is a vector with norm <math>1</math>. For any nonzero vector <math>v \in \mathbf{R}^n</math>, scaling <math>v</math> by the positive scalar <math>\frac{1}{\|v\|}</math> yields a unit vector in the same direction (a process called '''normalization'''): | |||
<math>\hat{v} = \frac{1}{\|v\|}v</math> | |||
For example, if <math>\vec{v} = (v_x, v_y, v_z) \in \mathbf{R}^3</math> is nonzero, then <math>\hat{v} = \frac{1}{\|\vec{v}\|}(v_x, v_y, v_z)</math>. Note that unit vectors carry no physical units because the units of <math>\vec{v}</math> and <math>\|\vec{v}\|</math> cancel. | |||
=== | ===Orthonormal Bases=== | ||
Two vectors <math>u, v</math> in an inner product space are called '''orthogonal''' if <math>\langle u, v \rangle = 0</math>. A list of vectors <math>e_1, \dots, e_n</math> is '''orthonormal''' if every vector has norm <math>1</math> and every pair of distinct vectors is orthogonal (<math>\langle e_j, e_k \rangle = 0</math> for <math>j \neq k</math>). | |||
The '''standard basis''' of <math>\mathbf{R}^3</math> is an '''orthonormal basis''' consisting of the three unit vectors: | |||
<math>\hat{x} = (1, 0, 0), \qquad \hat{y} = (0, 1, 0), \qquad \hat{z} = (0, 0, 1)</math> | |||
<math>\ | (also sometimes written <math>\hat{i}, \hat{j}, \hat{k}</math> in physics and engineering). We can think of a basis as a fundamental list of vectors for a vector space that gives each component its meaning. For the standard basis, our list gives each component a meaning that it is the x, y, or z direction. This basis is orthonormal, so every vector <math>v \in \mathbf{R}^3</math> can be written uniquely as a linear combination whose coefficients are simply the inner products of <math>v</math> with each basis vector: | ||
= | <math>v = \langle v, \hat{x} \rangle \hat{x} + \langle v, \hat{y} \rangle \hat{y} + \langle v, \hat{z} \rangle \hat{z}</math> | ||
Other coordinate systems use different local orthonormal bases that vary with position, such as <math>\hat{r}</math> and <math>\hat{\theta}</math> in polar coordinates. | |||
==== | ===Direction and Angles=== | ||
The | In <math>\mathbf{R}^2</math> and <math>\mathbf{R}^3</math>, scalar multiplication gives a direct geometric interpretation of direction: for a nonzero <math>v</math>, multiplying by <math>\lambda > 0</math> scales its norm without changing its direction, while multiplying by <math>\lambda < 0</math> reverses its direction (with <math>(-1)v = -v</math> pointing directly opposite to <math>v</math>). The zero vector <math>0 = (0, \dots, 0)</math> has norm <math>0</math> and '''no direction'''. | ||
To quantify relative direction between any two nonzero vectors <math>u, v \in \mathbf{R}^n</math>, we rely on the '''Cauchy–Schwarz inequality''': | |||
<math>\ | <math>|\langle u, v \rangle| \le \|u\|\|v\|</math> | ||
Dividing by <math>\|u\|\|v\| > 0</math> guarantees that <math>-1 \le \frac{\langle u, v \rangle}{\|u\|\|v\|} \le 1</math>. Because of this, there exists a unique '''angle''' <math>\theta \in [0, \pi]</math> between <math>u</math> and <math>v</math> where: | |||
<math>\cos\theta = \frac{\langle u, v \rangle}{\|u\|\|v\|}</math> | |||
= | Two nonzero vectors are orthogonal (<math>\langle u, v \rangle = 0</math>) if and only if <math>\cos\theta = 0</math>, meaning they are '''perpendicular''' (<math>\theta = \frac{\pi}{2}</math>). | ||
<math> \ | '''Unsigned angle vs. 2D polar direction angle:''' Notice that the inner-product angle <math>\theta = \arccos\left(\frac{\langle v, \hat{x}\rangle}{\|v\|}\right) = \arccos\left(\frac{v_x}{\|v\|}\right)</math> always lies in <math>[0, \pi]</math> and therefore cannot distinguish whether a 2D vector points above or below the <math>x</math>-axis (it loses the sign of <math>v_y</math>). In introductory 2D physics, we instead specify a vector's full orientation using a '''signed polar direction angle''' <math>\phi \in (-\pi, \pi]</math> (or <math>[0, 2\pi)</math>) measured counterclockwise from the positive <math>x</math>-axis. For a nonzero vector <math>v = (v_x, v_y) \in \mathbf{R}^2</math>: | ||
* If <math>v_x > 0</math>: <math>\phi = \arctan\left(\frac{v_y}{v_x}\right)</math>. | |||
* If <math>v_x < 0</math>: <math>\phi = \arctan\left(\frac{v_y}{v_x}\right) + \pi</math> (or <math>-\pi</math>, depending on the chosen branch) to place <math>\phi</math> in the second or third quadrant. | |||
* If <math>v_x = 0</math>: <math>\phi = \frac{\pi}{2}</math> (<math>90^\circ</math>) when <math>v_y > 0</math>, and <math>\phi = -\frac{\pi}{2}</math> (<math>270^\circ</math>) when <math>v_y < 0</math>. | |||
==Vector Operations== | |||
Vector addition and scalar multiplication are built into every vector space. The dot product and cross product add geometric structure for measuring projections, angles, areas, and orientations. Below, formulas are written in <math>\mathbf{R}^3</math> for introductory physics, with notes on how they generalize to <math>\mathbf{R}^n</math>. | |||
===Addition and Subtraction=== | |||
In <math>\mathbf{R}^n</math>, vector addition is defined coordinate-wise. For <math>\vec{a} = (a_x, a_y, a_z)</math> and <math>\vec{b} = (b_x, b_y, b_z)</math> in <math>\mathbf{R}^3</math>: | |||
= | <math>\vec{a} + \vec{b} = (a_x + b_x,\; a_y + b_y,\; a_z + b_z)</math> | ||
By the vector space axioms, addition is commutative (<math>\vec{a} + \vec{b} = \vec{b} + \vec{a}</math>) and associative (<math>(\vec{a} + \vec{b}) + \vec{c} = \vec{a} + (\vec{b} + \vec{c})</math>). Geometrically, placing the tail of <math>\vec{b}</math> at the head of <math>\vec{a}</math> yields the '''resultant''' vector <math>\vec{a} + \vec{b}</math>, running from the tail of <math>\vec{a}</math> to the head of <math>\vec{b}</math>. | |||
<math>\vec{a} + \vec{b} = \ | |||
[[File:Vectoraddition.png|600px]] | [[File:Vectoraddition.png|600px]] | ||
Every vector <math>\vec{b}</math> has a unique additive inverse <math>-\vec{b} = (-1)\vec{b}</math>, which has the same norm as <math>\vec{b}</math> but points in the opposite direction. '''Vector subtraction''' is formally defined as adding this additive inverse; for 3-dimensional vectors: | |||
<math>\vec{a | |||
<math>\vec{a} - \vec{b} = \vec{a} + (-\vec{b}) = (a_x - b_x,\; a_y - b_y,\; a_z - b_z)</math> | |||
[[File:IMG_0326.jpg|500px|Image: 500 pixels]] | [[File:IMG_0326.jpg|500px|Image: 500 pixels]] | ||
===Multiplication | ===Scalar Multiplication=== | ||
<math> | For a scalar <math>\lambda \in \mathbf{R}</math> and a vector <math>\vec{a} = (a_x, a_y, a_z) \in \mathbf{R}^3</math>, scalar multiplication multiplies every coordinate by <math>\lambda</math>: | ||
<math>\lambda \vec{a} = (\lambda a_x,\; \lambda a_y,\; \lambda a_z)</math> | |||
This scales the norm by <math>|\lambda|</math> (that is, <math>\|\lambda \vec{a}\| = |\lambda|\|\vec{a}\|</math>). If <math>\lambda > 0</math>, direction is preserved; if <math>\lambda < 0</math>, direction is reversed; if <math>\lambda = 0</math>, the result is the zero vector <math>\vec{0}</math>. | |||
[[File:Vectorscalarmultiplication.png|400px]] [[File:IMG_0327.jpg|400px|Image: 400 pixels]] | |||
Vector spaces do not include a separate "division by a scalar" axiom (nor is division by a vector defined). Instead, because every nonzero scalar <math>\lambda \in \mathbf{R}</math> has a unique multiplicative inverse <math>\frac{1}{\lambda} \in \mathbf{R}</math>, dividing a vector by <math>\lambda \neq 0</math> is simply scalar multiplication by <math>\frac{1}{\lambda}</math>: | |||
<math>\frac{\vec{a}}{\lambda} = \frac{1}{\lambda}\vec{a} = \left(\frac{a_x}{\lambda},\; \frac{a_y}{\lambda},\; \frac{a_z}{\lambda}\right)</math> | |||
===Dot Product=== | |||
== | The '''dot product''' (or '''scalar product''') is the Euclidean inner product on <math>\mathbf{R}^n</math>. For <math>\vec{a} = (a_x, a_y, a_z)</math> and <math>\vec{b} = (b_x, b_y, b_z)</math> in <math>\mathbf{R}^3</math>: | ||
<math>\vec{a}\cdot\vec{b} = | <math>\vec{a} \cdot \vec{b} = \langle \vec{a}, \vec{b} \rangle = a_x b_x + a_y b_y + a_z b_z</math> | ||
Unlike scalar multiplication, the dot product takes two vectors and outputs a '''scalar'''. For nonzero vectors separated by angle <math>\theta \in [0, \pi]</math>, it satisfies: | |||
<math>\vec{a} \cdot \vec{b} = \|\vec{a}\|\|\vec{b}\|\cos\theta</math> | |||
Geometrically, <math>\vec{a} \cdot \hat{b} = \|\vec{a}\|\cos\theta</math> gives the signed projection of <math>\vec{a}</math> onto the direction of <math>\vec{b}</math>—which is why mechanical work by a constant force is written <math>W = \vec{F} \cdot \Delta\vec{r}</math>. While the zero vector is formally orthogonal to every vector (<math>\vec{0} \cdot \vec{v} = 0</math>), two '''nonzero''' vectors are perpendicular (<math>\theta = \frac{\pi}{2}</math>) if and only if <math>\vec{a} \cdot \vec{b} = 0</math>. | |||
[[File:IMG_0328.jpg|400px|Image: 400 pixels]] | [[File:IMG_0328.jpg|400px|Image: 400 pixels]] | ||
===Cross Product ( | ===Cross Product=== | ||
In <math>\mathbf{R}^3</math>, the '''cross product''' (or '''vector product''') of <math>\vec{a} = (a_x, a_y, a_z)</math> and <math>\vec{b} = (b_x, b_y, b_z)</math> is a new vector defined in components by: | |||
<math>\vec{a} \times \vec{b} = (a_y b_z - a_z b_y,\; a_z b_x - a_x b_z,\; a_x b_y - a_y b_x)</math> | |||
Written in the standard orthonormal basis <math>\hat{i}, \hat{j}, \hat{k}</math>, this is equivalently: | |||
<math>\vec{a} \times \vec{b} | <math>\vec{a} \times \vec{b} = (a_y b_z - a_z b_y)\hat{i} - (a_x b_z - a_z b_x)\hat{j} + (a_x b_y - a_y b_x)\hat{k}</math> | ||
The cross product is bilinear (linear in each argument separately) and '''anticommutative'''—swapping the order reverses the sign: <math>\vec{b} \times \vec{a} = -(\vec{a} \times \vec{b})</math>. In particular, <math>\vec{a} \times \vec{a} = \vec{0}</math> for every vector <math>\vec{a}</math>. | |||
A standard mnemonic for computing <math>\vec{a} \times \vec{b}</math> is the formal determinant of a <math>3 \times 3</math> symbolic matrix, expanded along the first row (observing the alternating <math>+, -, +</math> signs of cofactor expansion): | |||
<math>\begin{vmatrix} | <math>\vec{a} \times \vec{b} = \begin{vmatrix} | ||
\hat{i} & \hat{j} & \hat{k} \\ | \hat{i} & \hat{j} & \hat{k} \\ | ||
a_x & a_y & a_z \\ | a_x & a_y & a_z \\ | ||
b_x & b_y & b_z | b_x & b_y & b_z | ||
\end{vmatrix}</math> | \end{vmatrix} = \begin{vmatrix} a_y & a_z \\ b_y & b_z \end{vmatrix}\hat{i} - \begin{vmatrix} a_x & a_z \\ b_x & b_z \end{vmatrix}\hat{j} + \begin{vmatrix} a_x & a_y \\ b_x & b_y \end{vmatrix}\hat{k}</math> | ||
[[File:Expansionbyminors.png|400px]] | [[File:Expansionbyminors.png|400px]] | ||
Online resources for checking computations: | |||
* [https://www.symbolab.com/solver/vector-cross-product-calculator Symbolab step-by-step cross product calculator] | |||
* [https://www.youtube.com/watch?v=e9T5p_Jwv5c Video explanation of the cross product] | |||
Geometrically, the norm of the cross product equals the '''area of the parallelogram''' spanned by <math>\vec{a}</math> and <math>\vec{b}</math>: | |||
<math>\|\vec{a} \times \vec{b}\| = \|\vec{a}\|\|\vec{b}\|\sin\theta</math> | |||
where <math>\theta \in [0, \pi]</math> is the angle between <math>\vec{a}</math> and <math>\vec{b}</math>. Its direction is orthogonal to both <math>\vec{a}</math> and <math>\vec{b}</math> and is uniquely determined by the [[Right Hand Rule]]. In introductory physics, the cross product governs rotational and electromagnetic phenomena such as torque (<math>\vec{\tau} = \vec{r} \times \vec{F}</math>), angular momentum (<math>\vec{L} = \vec{r} \times \vec{p}</math>), and the magnetic Lorentz force (<math>\vec{F}_B = q(\vec{v} \times \vec{B})</math>). | |||
====Component Pattern ("X-Method")==== | |||
A fast computational pattern avoids writing out the full <math>3 \times 3</math> determinant. Consider: | |||
<math>\vec{a} = (3, -2, 4), \qquad \vec{b} = (-1, 6, 3)</math> | |||
== | To compute <math>\vec{c} = \vec{a} \times \vec{b} = (c_x, c_y, c_z)</math>, list each vector's components vertically and append the first component at the bottom: | ||
<math>\begin{pmatrix} a_x \\ a_y \\ a_z \\ a_x \end{pmatrix} = \begin{pmatrix} 3 \\ -2 \\ 4 \\ 3 \end{pmatrix}, \qquad \begin{pmatrix} b_x \\ b_y \\ b_z \\ b_x \end{pmatrix} = \begin{pmatrix} -1 \\ 6 \\ 3 \\ -1 \end{pmatrix}</math> | |||
* For <math>c_x</math>, cross-multiply rows 2 and 3 (<math>a_y b_z - a_z b_y</math>): | |||
[[File:Cx.png]] | |||
:<math>c_x = (-2)(3) - (4)(6) = -6 - 24 = -30</math> | |||
* For <math>c_y</math>, cross-multiply rows 3 and 4 (<math>a_z b_x - a_x b_z</math>): | |||
[[File:Cy.png]] | |||
<math> | :<math>c_y = (4)(-1) - (3)(3) = -4 - 9 = -13</math> | ||
4 | |||
-1 | |||
3 | |||
- | |||
* For <math>c_z</math>, cross-multiply rows 1 and 2 (<math>a_x b_y - a_y b_x</math>): | |||
[[File:Cz.png]] | |||
:<math>c_z = (3)(6) - (-2)(-1) = 18 - 2 = 16</math> | |||
Thus <math>\vec{a} \times \vec{b} = (-30, -13, 16)</math>. As a quick sanity check, verify orthogonality via the dot product: <math>\vec{a} \cdot \vec{c} = 3(-30) + (-2)(-13) + 4(16) = 0</math>. | |||
====Advanced Note: What the Cross Product Really Measures (and Why 3D Is Special)==== | |||
< | <div class="mw-collapsible mw-collapsed" data-expandtext="Show Advanced Note" data-collapsetext="Hide Advanced Note" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | ||
'''Optional Reading (Geometric and Linear Algebra Interpretation)''' | |||
<div class="mw-collapsible-content"> | |||
<math> | At first glance, the component formula for <math>\vec{a} \times \vec{b}</math> seems arbitrary, and it is unclear where the <math>3 \times 3</math> determinant comes from. Two viewpoints make both completely transparent and explain what happens outside 3D. | ||
'''1. Components as Signed Shadow Areas''' | |||
Look at the three components of <math>\vec{c} = \vec{a} \times \vec{b}</math>: | |||
<math>c_x = a_y b_z - a_z b_y, \qquad c_y = a_z b_x - a_x b_z, \qquad c_z = a_x b_y - a_y b_x</math> | |||
In 2D, the expression <math>a_x b_y - a_y b_x</math> is the '''signed area''' of the parallelogram spanned by <math>(a_x, a_y)</math> and <math>(b_x, b_y)</math> (positive if rotating from <math>\vec{a}</math> to <math>\vec{b}</math> is counterclockwise, negative if clockwise). Therefore, the three components of <math>\vec{a} \times \vec{b}</math> can be seen as the signed areas of the '''shadows''' cast by the 3D parallelogram onto the three coordinate planes: | |||
* <math>c_x</math> is the signed area of the shadow on the <math>yz</math>-plane (perpendicular to the <math>x</math>-axis). | |||
* <math>c_y</math> is the signed area of the shadow on the <math>zx</math>-plane (perpendicular to the <math>y</math>-axis). | |||
* <math>c_z</math> is the signed area of the shadow on the <math>xy</math>-plane (perpendicular to the <math>z</math>-axis). | |||
<math>c_y | Then the formula <math>\|\vec{a} \times \vec{b}\| = \sqrt{c_x^2 + c_y^2 + c_z^2}</math> is a 3D Pythagorean theorem for areas: the squared area of any tilted parallelogram equals the sum of the squared areas of its three coordinate-plane shadows. | ||
'''2. The Determinant Formula as Signed Volume''' | |||
<math> | Fix two vectors <math>\vec{a}, \vec{b} \in \mathbf{R}^3</math>. For any third vector <math>\vec{v} = (v_x, v_y, v_z) \in \mathbf{R}^3</math>, the <math>3 \times 3</math> determinant | ||
<math>V(\vec{v}) = \det\begin{pmatrix} v_x & v_y & v_z \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{pmatrix}</math> | |||
gives the '''signed volume''' of the parallelepiped spanned by <math>\vec{a}</math>, <math>\vec{b}</math>, and <math>\vec{v}</math>. Expanding along the first row shows that <math>V(\vec{v})</math> is simply a linear combination of <math>v_x, v_y, v_z</math>: | |||
<math>V(\vec{v}) = (a_y b_z - a_z b_y)v_x + (a_z b_x - a_x b_z)v_y + (a_x b_y - a_y b_x)v_z = \langle \vec{c}, \vec{v} \rangle</math> | |||
<math> | In linear algebra, the cross product <math>\vec{c} = \vec{a} \times \vec{b}</math> is '''defined''' as the unique vector whose inner product with any <math>\vec{v}</math> computes this signed volume: <math>\langle \vec{a} \times \vec{b}, \vec{v} \rangle = V(\vec{v})</math>. This single equation explains every property of the cross product at once: | ||
* '''Why the determinant works:''' Replacing <math>(v_x, v_y, v_z)</math> with <math>(\hat{i}, \hat{j}, \hat{k})</math> is just a compact way of collecting the coefficients of <math>v_x, v_y, v_z</math> into the vector <math>\vec{c}</math>. | |||
* '''Orthogonality:''' Setting <math>\vec{v} = \vec{a}</math> or <math>\vec{v} = \vec{b}</math> flattens the parallelepiped to volume <math>0</math>, so <math>\langle \vec{a} \times \vec{b}, \vec{a} \rangle = 0</math> and <math>\langle \vec{a} \times \vec{b}, \vec{b} \rangle = 0</math>. | |||
* '''Magnitude = Base Area:''' Setting <math>\vec{v} = \hat{n}</math> (the unit vector pointing in the direction of <math>\vec{a} \times \vec{b}</math>) builds a parallelepiped of height <math>1</math> over the base spanned by <math>\vec{a}</math> and <math>\vec{b}</math>. Its volume equals <math>(\text{base area}) \times 1</math>, while <math>\langle \vec{a} \times \vec{b}, \hat{n} \rangle = \|\vec{a} \times \vec{b}\|</math>. | |||
* '''Right-hand rule:''' Setting <math>\vec{v} = \vec{a} \times \vec{b}</math> gives volume <math>\|\vec{a} \times \vec{b}\|^2 > 0</math> (for non-parallel <math>\vec{a}, \vec{b}</math>), forcing <math>(\vec{a}, \vec{b}, \vec{a} \times \vec{b})</math> to have positive (right-handed) orientation. | |||
'''3. Why Two-Vector Cross Products Are Special to 3D (and the 7D Exception)''' | |||
<math> | Suppose you have two non-parallel vectors <math>a, b \in \mathbf{R}^n</math> and want a vector <math>v \in \mathbf{R}^n</math> orthogonal to both. That means solving two linear equations—<math>\langle a, v \rangle = 0</math> and <math>\langle b, v \rangle = 0</math>—in <math>n</math> unknowns, leaving <math>n - 2</math> free parameters: | ||
* In <math>\mathbf{R}^2</math> (<math>n = 2</math>): <math>2 - 2 = 0</math> free parameters. Only the zero vector is orthogonal to both <math>a</math> and <math>b</math>. | |||
* In <math>\mathbf{R}^3</math> (<math>n = 3</math>): <math>3 - 2 = 1</math> free parameter. All orthogonal vectors lie along a '''single line''', so specifying magnitude and the right-hand rule picks out a unique vector. | |||
* In <math>\mathbf{R}^4</math> (<math>n = 4</math>): <math>4 - 2 = 2</math> free parameters—an entire 2D plane of orthogonal vectors. For example, both <math>(0, 0, 1, 0)</math> and <math>(0, 0, 0, 1)</math> (and every linear combination of them) are perpendicular to <math>(1, 0, 0, 0)</math> and <math>(0, 1, 0, 0)</math>, so "perpendicular to both" no longer specifies a single direction. | |||
Physics uses the cross product to describe '''rotations and oriented planes''' (such as the plane of a spinning wheel or a current loop). Every rotation takes place ''in a 2D plane'', not inherently ''around a line'': | |||
* In 2D, there is only <math>\binom{2}{2} = 1</math> coordinate plane (<math>xy</math>), so rotation is just a single signed scalar (clockwise or counterclockwise). | |||
* In 3D, there are <math>\binom{3}{2} = 3</math> coordinate planes (<math>yz, zx, xy</math>)—which happens to equal the <math>3</math> coordinate axes (<math>x, y, z</math>). This coincidence lets us pair each plane of rotation with its unique normal axis and package torque, angular momentum, and magnetic fields as 3D vectors. | |||
* In 4D, there are <math>\binom{4}{2} = 6</math> independent coordinate planes (<math>xy, xz, xw, yz, yw, zw</math>), which cannot be stored in a 4-component vector. That is why in 4D relativity, angular momentum and the electromagnetic field are represented as <math>4 \times 4</math> antisymmetric matrices (which have <math>6</math> independent entries—one per coordinate plane) rather than 4-vectors. | |||
The signed-volume construction <math>\langle c, v \rangle = \det(v, v_1, \dots, v_{n-1})</math> generalizes cleanly to any dimension <math>n</math> if you supply <math>n - 1</math> vectors instead of <math>2</math> (leaving <math>n - (n - 1) = 1</math> perpendicular axis). In 2D, it takes <math>1</math> vector <math>(a_x, a_y)</math> and returns <math>(-a_y, a_x)</math> (a <math>90^\circ</math> counterclockwise rotation); in 3D, it takes <math>2</math> vectors (the standard cross product); in 4D, it takes <math>3</math> vectors to determine a single perpendicular vector. | |||
- | Finally, what if we relax the requirement that orthogonality alone determine a unique line, and simply ask for ''any'' bilinear product of two vectors in <math>\mathbf{R}^n</math> (<math>n \ge 2</math>) that is orthogonal to both inputs and has norm equal to the parallelogram area (<math>\|a \times b\|^2 = \|a\|^2\|b\|^2 - \langle a, b \rangle^2</math>)? Remarkably, such a cross product exists '''only in <math>n = 3</math> and <math>n = 7</math>'''. In <math>\mathbf{R}^7</math>, the space orthogonal to two non-parallel vectors is <math>7 - 2 = 5</math>-dimensional, so orthogonality does not select a direction; instead, a 7D cross product picks out a specific perpendicular vector using the multiplication table of the 8-dimensional '''octonions''' (just as the 3D cross product comes from the 4-dimensional '''quaternions'''). Because that choice depends on the octonion multiplication rule, the 7D cross product is not unique up to sign, is not preserved by all 7D rotations, and loses the general vector triple product identity (since octonion multiplication is non-associative). | ||
</div> | |||
</div> | |||
== | ===Vector Product Identities=== | ||
When combining dot products and cross products in <math>\mathbf{R}^3</math>, two identities are particularly useful: | |||
< | # '''Orthogonality:''' <math>(\vec{w} \times \vec{v}) \cdot \vec{v} = 0</math> and <math>(\vec{w} \times \vec{v}) \cdot \vec{w} = 0</math>. Because <math>\vec{w} \times \vec{v}</math> is orthogonal to both <math>\vec{w}</math> and <math>\vec{v}</math>, its dot product with either vanishes. | ||
# '''Scalar Triple Product:''' <math>\vec{a} \cdot (\vec{b} \times \vec{c}) = (\vec{a} \times \vec{b}) \cdot \vec{c} = \vec{b} \cdot (\vec{c} \times \vec{a})</math>. This scalar equals the determinant of the <math>3 \times 3</math> matrix whose rows (or columns) are <math>\vec{a}, \vec{b}, \vec{c}</math>, and its absolute value equals the '''volume of the parallelepiped''' spanned by the vectors. Cyclic permutations of these vectors preserve the volume and swapping any two vectors flips the sign. | |||
== | ==Representations of a Vector== | ||
A physical vector or an element of an abstract vector space <math>V</math> exists independently of any coordinate system. Once an ordered basis is chosen, it establishes a one-to-one correspondence (isomorphism <math>V \cong \mathbf{R}^n</math>) that assigns each vector a unique list of coordinates. Depending on the problem, we choose whichever representation is most convenient; all carry identical information. | |||
===Magnitude and Direction Form=== | ===Magnitude and Direction Form=== | ||
In this form, | In this form, we specify: | ||
* The norm (magnitude) <math>\|\vec{a}\|</math>, and | |||
* The orientation (an angle, cardinal direction, or axis). | |||
For example, "a <math>5\ \text{m}</math> displacement at <math>36.9^\circ</math> above the horizontal" is in this form. This form is intuitive and often used in word problems and real-life descriptions. | |||
===Component Form=== | ===Component Form=== | ||
Once a basis is decided, we break the vector into components along the coordinate axes. In <math>\mathbf{R}^3</math>: | |||
<math>\vec{a} = (a_x, a_y, a_z)</math> | |||
For example, <math>(4, 3, 0)</math> means the vector extends 4 units along <math>+x</math>, 3 along <math>y</math>, and 0 along <math>z</math>. Most algebraic operations are done using component form. Computers also typically store vectors this way (at least in the abstract sense). | |||
===Unit Vector Form=== | ===Unit Vector Form=== | ||
Using the standard orthonormal basis <math>\hat{i}, \hat{j}, \hat{k}</math> (or alternatively written as <math>\hat{x}, \hat{y}, \hat{z}</math>) of <math>\mathbf{R}^3</math>, every vector is written uniquely as a linear combination: | |||
<math>\vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k}</math> | |||
For example, <math>(4, 3, 0) = 4\hat{i} + 3\hat{j}</math>. Unit vector form and component form carry identical numerical information; basis form makes the underlying linear combination explicit, which can be useful when working in other bases. | |||
[[File:Vectorsdifferentforms.png]] | [[File:Vectorsdifferentforms.png]] | ||
In <math>n</math> dimensions, specifying a vector always requires <math>n</math> numbers in the field (which in introductory physics is almost always the real numbers), regardless of the representation. In <math>\mathbf{R}^3</math>, Cartesian component form uses <math>3</math> coordinates <math>(a_x, a_y, a_z)</math>, while spherical magnitude–direction form uses <math>1</math> norm and <math>2</math> angles <math>(\|\vec{a}\|, \theta, \phi)</math>. | |||
===Converting Between Forms=== | ===Converting Between Forms=== | ||
In <math>\mathbf{R}^2</math>, we convert between Cartesian components <math>(a_x, a_y)</math> and polar magnitude–direction form <math>(\|\vec{a}\|, \phi)</math> with <math>\phi \in (-\pi, \pi]</math> using the inner product and right-triangle trigonometry: | |||
* '''Components to magnitude and direction:''' | |||
:<math>\|\vec{a}\| = \sqrt{\langle \vec{a}, \vec{a} \rangle} = \sqrt{a_x^2 + a_y^2}</math> | |||
:<math>\phi = \begin{cases} \arctan\!\left(\frac{a_y}{a_x}\right) & \text{if } a_x > 0, \\ \arctan\!\left(\frac{a_y}{a_x}\right) + \pi & \text{if } a_x < 0 \text{ and } a_y \ge 0, \\ \arctan\!\left(\frac{a_y}{a_x}\right) - \pi & \text{if } a_x < 0 \text{ and } a_y < 0, \\ \frac{\pi}{2} & \text{if } a_x = 0 \text{ and } a_y > 0, \\ -\frac{\pi}{2} & \text{if } a_x = 0 \text{ and } a_y < 0. \end{cases}</math> | |||
:(For <math>\vec{a} = (0, 0)</math>, <math>\phi</math> is undefined. This piecewise formula is equivalent to the two-argument function <math>\operatorname{atan2}(a_y, a_x)</math> used in computing; to express <math>\phi</math> in <math>[0, 2\pi)</math> instead, add <math>2\pi</math> whenever <math>\phi < 0</math>.) | |||
* '''Magnitude and direction to components''' (via inner product projections onto the orthonormal basis <math>\hat{x}, \hat{y}</math>): | |||
:<math>a_x = \langle \vec{a}, \hat{x} \rangle = \|\vec{a}\|\cos\phi</math> | |||
:<math>a_y = \langle \vec{a}, \hat{y} \rangle = \|\vec{a}\|\sin\phi</math> | |||
==Vectors in VPython== | ==Vectors in VPython== | ||
In VPython (used in GlowScript), vectors are represented by the type <code>vec</code> or <code>vector</code>. The constructor takes three arguments: the x, y, and z components: | |||
<pre> | |||
velocity = vec(3, -1, 2) | |||
</pre> | |||
<code>velocity | This creates a vector called <code>velocity</code> with coordinates <math>(3, -1, 2)</math>. (Note that when printed to the console, VPython displays vectors using angle brackets, e.g., <code><3, -1, 2></code>, following introductory physics convention rather than inner-product notation.) | ||
In | In VPython's default view, <math>+x</math> points right, <math>+y</math> points upward, and <math>+z</math> points out of the screen toward the viewer. | ||
===Modifying Vectors=== | |||
Individual components can be accessed or updated with <code>.x</code>, <code>.y</code>, and <code>.z</code>: | |||
< | <pre> | ||
velocity.x = 5 # changes velocity from (3, -1, 2) to (5, -1, 2) | |||
</pre> | |||
===Helpful Vector Functions=== | ===Helpful Vector Functions=== | ||
====Magnitude==== | ====Magnitude==== | ||
VPython provides the <code>mag</code> function to compute the magnitude (Euclidean norm) of a vector: | |||
<pre> | |||
velocity = vec(3, -1, 2) | |||
speed = mag(velocity) # magnitude of velocity | |||
</pre> | |||
===Normalize=== | ====Normalize==== | ||
To obtain a unit vector in the same direction (normalize a vector), use <code>norm</code>: | |||
<pre> | |||
v = vec(5, 0, 0) | |||
v_hat = norm(v) # unit vector (1, 0, 0) | |||
</pre> | |||
====Dot and Cross Product==== | |||
The functions <code>dot</code> and <code>cross</code> compute dot and cross products: | |||
<pre> | |||
a = vec(1, 2, 3) | |||
b = vec(4, 5, 6) | |||
dot_prod = dot(a, b) # <a, b> = a · b | |||
cross_prod = cross(a, b) # a × b | |||
</pre> | |||
===Visualization=== | ===Visualization=== | ||
To visualize vectors | To visualize vectors, VPython provides the <code>arrow</code> object, specified by: | ||
* <code>pos</code> – tail position, | |||
* <code>axis</code> – direction and length of the arrow (a vector). | |||
Optional attributes include <code>shaftwidth</code>, <code>headwidth</code>, <code>headlength</code>, and <code>color</code> (see the [https://www.glowscript.org/docs/VPythonDocs/arrow.html VPython arrow documentation]). | |||
<pre> | |||
velocity = vec(1, 1, 0) | |||
origin = vec(0, 0, 0) | |||
shaftwidth = 0.1 | |||
vel_arrow = arrow(pos=origin, axis=velocity, | |||
shaftwidth=shaftwidth, color=color.red) | |||
</pre> | |||
[[File:Arrow_viz.png]] | |||
''Output in VPython of a visualized vector'' | |||
===A Computational Model=== | |||
[https://trinket.io/glowscript/3d7c75ed91 Click here to run the interactive GlowScript computational model.] | |||
This model walks through basic vector operations step by step. It starts by defining vectors as arrows, then explores: | |||
* Addition and subtraction | |||
* Scalar multiplication | |||
* Magnitude and unit vectors | |||
* Dot and cross products | |||
Each operation is shown both in formula form and using VPython shortcut functions. You can edit the vector values and rerun the code to see how the results change. Commenting out parts of the script can help you focus on one type of operation at a time. | |||
== | ==Exercises and Solutions== | ||
===Very Simple=== | ===Very Simple=== | ||
Given the vector <math>\vec{a} = (2.5, 7.4, 8.0)</math>, find its norm (magnitude) and a unit vector in its direction. | |||
<div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | |||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
First, compute the Euclidean norm: | |||
<math>\|\vec{a}\| = \sqrt{2.5^2 + 7.4^2 + 8.0^2} = \sqrt{6.25 + 54.76 + 64} = \sqrt{125.01} \approx 11.18.</math> | |||
<math>| | <math>\hat{a} = \frac{1}{\|\vec{a}\|}\vec{a} = \left(\frac{2.5}{\sqrt{125.01}},\; \frac{7.4}{\sqrt{125.01}},\; \frac{8.0}{\sqrt{125.01}}\right) \approx (0.224,\; 0.662,\; 0.716).</math> | ||
<math> | Then the norm is about <math>11.18</math>, and the unit vector in its direction is <math>(0.224, 0.662, 0.716)</math>. | ||
< | </div> | ||
</div> | |||
===Simple=== | |||
Let <math>\vec{a} = (2, 4, 2)</math> and <math>\vec{b} = (-1, 1, 3)</math>. Find the norm of <math>\vec{a} - 2\vec{b}</math>. | |||
< | <div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | ||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
Compute the combination coordinate-wise: | |||
<math> | <math>\vec{a} - 2\vec{b} = (2, 4, 2) - 2(-1, 1, 3) = (2, 4, 2) - (-2, 2, 6) = (4, 2, -4).</math> | ||
Now find its norm: | |||
<math> | <math>\|(4, 2, -4)\| = \sqrt{4^2 + 2^2 + (-4)^2} = \sqrt{16 + 4 + 16} = \sqrt{36} = 6.</math> | ||
</div> | |||
</div> | |||
===Simple=== | ===Simple=== | ||
Find the angle <math>\theta \in [0, \pi]</math> between <math>\vec{a} = (2, 5, -2)</math> and <math>\vec{b} = (3, -4, -1)</math>. | |||
Solution: | <div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | ||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
From the inner product angle formula: | |||
<math> = | <math>\langle \vec{a}, \vec{b} \rangle = \|\vec{a}\|\|\vec{b}\|\cos\theta \implies \theta = \arccos\!\left(\frac{\langle \vec{a}, \vec{b} \rangle}{\|\vec{a}\|\|\vec{b}\|}\right).</math> | ||
Compute the inner product: | |||
<math>\langle \vec{a}, \vec{b} \rangle = 2(3) + 5(-4) + (-2)(-1) = 6 - 20 + 2 = -12.</math> | |||
Compute the norms: | |||
<math> = \sqrt{ | <math>\|\vec{a}\| = \sqrt{2^2 + 5^2 + (-2)^2} = \sqrt{4 + 25 + 4} = \sqrt{33},</math> | ||
<math> = \sqrt{ | <math>\|\vec{b}\| = \sqrt{3^2 + (-4)^2 + (-1)^2} = \sqrt{9 + 16 + 1} = \sqrt{26}.</math> | ||
Finally, | |||
<math>\theta = \arccos\!\left(\frac{-12}{\sqrt{33}\sqrt{26}}\right) = \arccos\!\left(\frac{-12}{\sqrt{858}}\right) \approx 114.2^\circ.</math> | |||
</div> | |||
</div> | |||
===Intermediate=== | ===Intermediate=== | ||
An airplane is | An airplane is flying in still air at <math>240\ \text{m/s}</math>, <math>35^\circ</math> south of west. A wind begins blowing at <math>80\ \text{m/s}</math>, <math>15^\circ</math> east of north. What must the plane’s new velocity relative to the air be in order to keep the same overall trajectory? Give your answer in components with <math>+x</math> east and <math>+y</math> north. | ||
[[File:Vectorsplaneproblem.png]] | [[File:Vectorsplaneproblem.png]] | ||
Solution: | <div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | ||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
Let: | |||
* <math>\vec{v}_{p,0}</math> = original velocity of the plane (relative to air), | |||
* <math>\vec{v}_w</math> = wind velocity (relative to ground), | |||
* <math>\vec{v}_{p,1}</math> = new velocity of the plane relative to the air. | |||
With the wind blowing, the plane's velocity relative to the ground is <math>\vec{v}_{p,1} + \vec{v}_w</math>. Requiring this resultant ground velocity to remain equal to <math>\vec{v}_{p,0}</math> gives: | |||
<math>\vec{v}_{p,1} + \vec{v}_w = \vec{v}_{p,0} \implies \vec{v}_{p,1} = \vec{v}_{p,0} - \vec{v}_w.</math> | |||
Express everything in components (<math>+x</math> east, <math>+y</math> north): | |||
* <math>35^\circ</math> south of west corresponds to <math>\phi = 180^\circ + 35^\circ = 215^\circ</math> from the <math>+x</math>-axis: | |||
:<math>\vec{v}_{p,0} = (240\cos 215^\circ,\; 240\sin 215^\circ)\ \text{m/s} \approx (-196.60,\; -137.66)\ \text{m/s}.</math> | |||
* <math>15^\circ</math> east of north corresponds to <math>\phi = 90^\circ - 15^\circ = 75^\circ</math> from the <math>+x</math>-axis: | |||
:<math>\vec{v}_w = (80\cos 75^\circ,\; 80\sin 75^\circ)\ \text{m/s} \approx (20.71,\; 77.27)\ \text{m/s}.</math> | |||
Subtract component-wise: | |||
<math>\vec{v}_{p,1} = \vec{v}_{p,0} - \vec{v}_w \approx (-196.60,\; -137.66) - (20.71,\; 77.27) \approx (-217.3,\; -214.9)\ \text{m/s}.</math> | |||
The plane must adjust its velocity relative to the air to approximately <math>(-217.3, -214.9)\ \text{m/s}</math> to maintain its original ground velocity. | |||
</div> | |||
</div> | |||
===Intermediate=== | |||
A mechanic applies a force <math>\vec{F} = (30,\; 20,\; -20)\ \text{N}</math> to the end of a lever whose position vector relative to the pivot is <math>\vec{r} = (0.3,\; -0.4,\; 0.1)\ \text{m}</math>. | |||
# Compute the torque vector <math>\vec{\tau} = \vec{r} \times \vec{F}</math> about the pivot. | |||
# Find the magnitude <math>\|\vec{\tau}\|</math> of the torque. | |||
# Verify using inner products that <math>\vec{\tau}</math> is orthogonal to both <math>\vec{r}</math> and <math>\vec{F}</math>, and state what vector you would obtain if you mistakenly computed <math>\vec{F} \times \vec{r}</math> instead. | |||
<div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | |||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
'''1. Compute <math>\vec{\tau} = \vec{r} \times \vec{F}</math>:''' | |||
<math> \vec{ | Using the determinant form (or component formula) with <math>\vec{r} = (0.3, -0.4, 0.1)\ \text{m}</math> and <math>\vec{F} = (30, 20, -20)\ \text{N}</math>: | ||
<math> \vec{ | <math>\vec{\tau} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 0.3 & -0.4 & 0.1 \\ 30 & 20 & -20 \end{vmatrix}\ \text{N}\cdot\text{m}</math> | ||
Expand component by component (keeping track of the minus sign on the <math>\hat{j}</math> term): | |||
* <math>\tau_x = (-0.4)(-20) - (0.1)(20) = 8 - 2 = 6\ \text{N}\cdot\text{m}</math> | |||
* <math>\tau_y = -\big[(0.3)(-20) - (0.1)(30)\big] = -(-6 - 3) = 9\ \text{N}\cdot\text{m}</math> | |||
* <math>\tau_z = (0.3)(20) - (-0.4)(30) = 6 - (-12) = 18\ \text{N}\cdot\text{m}</math> | |||
Thus, | |||
<math>\vec{ | <math>\vec{\tau} = (6,\; 9,\; 18)\ \text{N}\cdot\text{m}.</math> | ||
<math>\ | ''(Note: Although <math>\text{N}\cdot\text{m}</math> has the same SI base units as the joule, torque is conventionally written in <math>\text{N}\cdot\text{m}</math> to distinguish it from energy or work.)'' | ||
<math>\vec{ | '''2. Find the magnitude <math>\|\vec{\tau}\|</math>:''' | ||
<math>\|\vec{\tau}\| = \sqrt{6^2 + 9^2 + 18^2}\ \text{N}\cdot\text{m} = \sqrt{36 + 81 + 324}\ \text{N}\cdot\text{m} = \sqrt{441}\ \text{N}\cdot\text{m} = 21\ \text{N}\cdot\text{m}.</math> | |||
'''3. Verify orthogonality and anticommutativity:''' | |||
<math> \vec{ | Compute the inner product of <math>\vec{\tau}</math> with <math>\vec{r}</math> and with <math>\vec{F}</math>: | ||
<math> \vec{ | <math>\langle \vec{\tau}, \vec{r} \rangle = 6(0.3) + 9(-0.4) + 18(0.1) = 1.8 - 3.6 + 1.8 = 0,</math> | ||
=== | <math>\langle \vec{\tau}, \vec{F} \rangle = 6(30) + 9(20) + 18(-20) = 180 + 180 - 360 = 0.</math> | ||
Since both inner products vanish, <math>\vec{\tau}</math> is orthogonal to both <math>\vec{r}</math> and <math>\vec{F}</math>. | |||
Finally, because the cross product is anticommutative (<math>\vec{F} \times \vec{r} = -(\vec{r} \times \vec{F})</math>), reversing the order flips every sign: | |||
<math>\vec{F} \times \vec{r} = -\vec{\tau} = (-6,\; -9,\; -18)\ \text{N}\cdot\text{m}.</math> | |||
< | </div> | ||
</div> | |||
===Challenging=== | |||
<math> \ | Suppose <math>\vec{u}</math> and <math>\vec{v}</math> are two vectors in <math>\mathbf{R}^3</math> (or more generally <math>\mathbf{R}^n</math>) such that | ||
<math>\|\vec{u}\| = 3, \qquad \|\vec{u} + \vec{v}\| = 4, \qquad \|\vec{u} - \vec{v}\| = 6.</math> | |||
<math> \ | Without knowing any components of <math>\vec{u}</math> or <math>\vec{v}</math>, find the norm <math>\|\vec{v}\|</math> and the angle <math>\theta</math> between <math>\vec{u}</math> and <math>\vec{v}</math>. | ||
< | <div class="mw-collapsible mw-collapsed" data-expandtext="Show Solution" data-collapsetext="Hide Solution" style="border:1px solid #a2a9b1; padding:8px; background:#f8f9fa;"> | ||
'''Solution''' | |||
<div class="mw-collapsible-content"> | |||
<math> \ | Recall that the square of a vector's norm equals the inner product of the vector with itself: <math>\|x\|^2 = \langle x, x \rangle</math>. Expanding the squared norms of the sum and difference using the linearity and symmetry of the real inner product gives: | ||
== | <math>\|\vec{u} + \vec{v}\|^2 = \langle \vec{u} + \vec{v},\; \vec{u} + \vec{v} \rangle = \|\vec{u}\|^2 + 2\langle \vec{u}, \vec{v} \rangle + \|\vec{v}\|^2</math> | ||
<math>\|\vec{u} - \vec{v}\|^2 = \langle \vec{u} - \vec{v},\; \vec{u} - \vec{v} \rangle = \|\vec{u}\|^2 - 2\langle \vec{u}, \vec{v} \rangle + \|\vec{v}\|^2</math> | |||
'''1. Find <math>\|\vec{v}\|</math> (Parallelogram Equality):''' | |||
Adding the two equations cancels the <math>2\langle \vec{u}, \vec{v} \rangle</math> cross-term: | |||
<math>{\vec{ | <math>\|\vec{u} + \vec{v}\|^2 + \|\vec{u} - \vec{v}\|^2 = 2\left(\|\vec{u}\|^2 + \|\vec{v}\|^2\right)</math> | ||
Substitute the given norms (<math>\|\vec{u}\| = 3</math>, <math>\|\vec{u} + \vec{v}\| = 4</math>, <math>\|\vec{u} - \vec{v}\| = 6</math>): | |||
<math>4^2 + 6^2 = 2\left(3^2 + \|\vec{v}\|^2\right)</math> | |||
= | <math>16 + 36 = 2\left(9 + \|\vec{v}\|^2\right)</math> | ||
<math>52 = 18 + 2\|\vec{v}\|^2 \implies 2\|\vec{v}\|^2 = 34 \implies \|\vec{v}\|^2 = 17</math> | |||
Since a norm is always nonnegative: | |||
<math>\|\vec{v}\| = \sqrt{17} \approx 4.12.</math> | |||
== | '''2. Find the angle <math>\theta</math> between <math>\vec{u}</math> and <math>\vec{v}</math>:''' | ||
Subtracting the second expansion from the first isolates the inner product: | |||
<math>\|\vec{u} + \vec{v}\|^2 - \|\vec{u} - \vec{v}\|^2 = 4\langle \vec{u}, \vec{v} \rangle</math> | |||
<math>16 - 36 = 4\langle \vec{u}, \vec{v} \rangle \implies \langle \vec{u}, \vec{v} \rangle = -5</math> | |||
Applying the inner product angle formula: | |||
<math>\cos\theta = \frac{\langle \vec{u}, \vec{v} \rangle}{\|\vec{u}\|\|\vec{v}\|} = \frac{-5}{3\sqrt{17}} \approx -0.4042</math> | |||
<math>\theta = \arccos\!\left(\frac{-5}{3\sqrt{17}}\right) \approx 113.8^\circ.</math> | |||
''Geometric & physics note:'' Think of <math>\vec{u}</math> and <math>\vec{v}</math> as two adjacent sides of a parallelogram (for example, two forces acting on a particle); then <math>\vec{u} + \vec{v}</math> and <math>\vec{u} - \vec{v}</math> are its two diagonals. The identity <math>\|\vec{u} + \vec{v}\|^2 + \|\vec{u} - \vec{v}\|^2 = 2(\|\vec{u}\|^2 + \|\vec{v}\|^2)</math> is the '''parallelogram equality''', which allows us to recover unknown norms and angles purely from length measurements—without ever choosing a coordinate system. | |||
</div> | |||
</div> | |||
== | ==Applications and History== | ||
===Applications Across Disciplines=== | |||
Vectors appear in many everyday and engineering contexts. | |||
Consider a desk. Its weight is a force vector pointing downward, the normal force from the floor is a vector pointing upward, and the forces among the desk’s parts can all be represented as vectors. Measurements such as the diagonal distance across the desktop can also be seen as vectors from one corner to another. | |||
Your motion can be described using vectors as well. Your '''position''' relative to some reference point can be written as a position vector. The difference between two position vectors is a displacement vector. '''Velocity''' describes how your position changes over time; it is the time derivative of the position vector, and its magnitude is your speed. '''Acceleration''' is the time derivative of velocity. All of these quantities can be broken into components, which makes it easier to analyze motion in each direction separately. | |||
Vectors and units appear across everyday physical situations and virtually every STEM field: | |||
* '''Electromagnetism and Fields:''' Electric fields <math>\vec{E}</math> and magnetic fields <math>\vec{B}</math> are vector fields that assign a vector to every point in space, interacting with charges through operations like the Lorentz force <math>\vec{F} = q(\vec{E} + \vec{v} \times \vec{B})</math>. | |||
* '''Engineering:''' Structural stress analysis, fluid dynamics, robotics kinematics, control theory, and phasor analysis in AC electrical circuits all depend on vector spaces and inner products. | |||
* '''Computer Science and Graphics:''' 2D/3D rendering engines use vectors for positions, surface normals, lighting (via dot products), and coordinate transformations, while machine learning models represent data points as vectors in high-dimensional spaces <math>\mathbf{R}^n</math>. | |||
* '''Navigation:''' GPS receivers, aircraft, and ships continuously combine position, velocity, wind, and current vectors to compute headings and trajectories. | |||
===History=== | |||
Ideas similar to vectors go back many centuries. Early uses treated them as directed line segments rather than abstract quantities. Hero of Alexandria’s work ''Mechanics'' in the first century AD contains one of the earliest known discussions of adding such directed segments. | |||
In the 18th and 19th centuries, several mathematicians used 2D vectors to represent complex numbers. Caspar Wessel, Jean-Robert Argand, Carl Friedrich Gauss, and William Rowan Hamilton all contributed to this viewpoint. One component represented the real part, and the other represented the imaginary part. Hamilton also introduced the term “vector.” | |||
August Ferdinand Möbius, in his 1827 book ''The Barycentric Calculus'', formalized many vector ideas, including labeling vectors with letters and defining scalar multiplication. Hermann Grassmann, in his 1844 work ''Ausdehnungslehre'' (“The Calculus of Extension”), developed a more general theory of vectors in spaces of arbitrary dimension and laid foundations for linear algebra. | |||
The modern vector notation and conventions used in physics owe a lot to J. Willard Gibbs and Oliver Heaviside in the late 19th century. They refined vector methods and used them to express Maxwell’s equations of electromagnetism in the compact form we study today. | |||
==See Also== | |||
[https://www.glowscript.org/docs/VPythonDocs/vector.html https://www. | ===External Links=== | ||
* [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf MIT OpenCourseWare 18.02SC: Vectors and Matrices Notes] | |||
* [https://www.glowscript.org/docs/VPythonDocs/vector.html VPython / GlowScript Vector Documentation] | |||
* [https://www.physics.uoguelph.ca/tutorials/vectors/vectors.html University of Guelph: Introductory Vector Tutorial] | |||
===Further Reading=== | |||
* ''Linear Algebra Done Right'' – Sheldon Axler (2024) | |||
* ''Vector Analysis'' – Josiah Willard Gibbs & Edwin Bidwell Wilson (1901) | |||
* ''Introduction to Matrices and Vectors'' – Jacob T. Schwartz (1961) | |||
[https://www. | ==References== | ||
* Axler, Sheldon. [https://linear.axler.net ''Linear Algebra Done Right''] (4th ed., Springer, 2024). | |||
* [https://mathinsight.org/vector_introduction Math Insight: An Introduction to Vectors] | |||
* [https://mathinsight.org/definition/magnitude_vector Math Insight: Magnitude of a Vector] | |||
* [https://www.mathsisfun.com/algebra/vectors.html Math is Fun: Vectors] | |||
* [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf MIT OCW 18.02SC Multivariable Calculus: Session 1 Notes] | |||
* [http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html McGill University: Brief History of Vectors] | |||
* [https://www.glowscript.org/docs/VPythonDocs/vector.html GlowScript / VPython Documentation: Vectors] | |||
* [https://www.glowscript.org/docs/VPythonDocs/arrow.html GlowScript / VPython Documentation: Arrow] | |||
* [https://www.britannica.com/science/vector-mathematics Encyclopædia Britannica: Vector (Mathematics)] | |||
* [https://www.grc.nasa.gov/www/k-12/rocket/vectcomp.html NASA Glenn Research Center: Vector Components] | |||
* [https://www.onlinemathlearning.com/dot-product.html Online Math Learning: Dot Product] | |||
[[Category: Geometry]] | [[Category: Geometry]] | ||
Latest revision as of 22:17, 24 November 2026
John Yang -- Fall 2026
Introduction
Vectors and units are used for precisely describing the physical world. A vector in introductory physics can be thought of as a quantity that has both magnitude (how big) and direction (which way). Many important physical quantities are vectors: displacement, velocity, acceleration, and force all need both size and direction to be specified. By representing these quantities as vectors, we can keep track of how they interact.
Units, meanwhile, tell us what we are measuring. A number by itself has no physical meaning until we attach a unit such as meters (m), seconds (s), or newtons (N). Consistent use of units helps us spot mistakes, compare results, and communicate clearly. Together, vectors and units allow scientists, engineers, and programmers to build models and make inferences and predictions for real-world behavior and to do computations that are physically meaningful.
In physics and engineering, vectors show up whenever we track motion, balance forces, or work with fields such as electric and magnetic fields. In computer science and related fields, vectors appear in computer graphics, simulations, game physics, machine learning, and data representation. Units give meaning to these values and ensure that all of these computations line up with real measurements. A strong grasp of both vectors and units is essential for problem solving, interpreting relations, and understanding of physics in general.
Notation Conventions
Introductory physics and pure mathematics often write the same vector concepts differently. Because this article bridges introductory physics and formal linear algebra, the table below summarizes both conventions and states the standard used on this page:
| Concept | Linear Algebra | Introductory Physics | Convention in This Article |
|---|---|---|---|
| Vector | [math]\displaystyle{ v }[/math] (plain italic; distinguished by context) | [math]\displaystyle{ \vec{v} }[/math], [math]\displaystyle{ \mathbf{v} }[/math], or [math]\displaystyle{ \overrightarrow{AB} }[/math] | [math]\displaystyle{ v }[/math] in abstract definitions; [math]\displaystyle{ \vec{v} }[/math] in physics and [math]\displaystyle{ \mathbf{R}^3 }[/math] |
| Coordinate tuple (vector in [math]\displaystyle{ \mathbf{R}^3 }[/math]) | [math]\displaystyle{ (v_x, v_y, v_z) }[/math] | [math]\displaystyle{ \langle v_x, v_y, v_z \rangle }[/math] or [math]\displaystyle{ (v_x, v_y, v_z) }[/math] | [math]\displaystyle{ (v_x, v_y, v_z) }[/math] |
| Inner product (dot product) | [math]\displaystyle{ \langle u, v \rangle }[/math] | [math]\displaystyle{ \vec{u} \cdot \vec{v} }[/math] | [math]\displaystyle{ \langle u, v \rangle }[/math] (and [math]\displaystyle{ \vec{u} \cdot \vec{v} }[/math] in [math]\displaystyle{ \mathbf{R}^n }[/math]) |
| Norm (magnitude) | [math]\displaystyle{ \|v\| }[/math] | [math]\displaystyle{ |\vec{v}| }[/math], [math]\displaystyle{ v }[/math], or [math]\displaystyle{ \|\vec{v}\|_2 }[/math] | [math]\displaystyle{ \|v\| }[/math] or [math]\displaystyle{ \|\vec{v}\| }[/math] |
| Unit vector | [math]\displaystyle{ u }[/math] with [math]\displaystyle{ \|u\| = 1 }[/math] | [math]\displaystyle{ \hat{v} }[/math]; standard basis [math]\displaystyle{ \hat{i}, \hat{j}, \hat{k} }[/math] or [math]\displaystyle{ \hat{x}, \hat{y}, \hat{z} }[/math] | [math]\displaystyle{ \hat{v} }[/math] and [math]\displaystyle{ \hat{i}, \hat{j}, \hat{k} }[/math] (or [math]\displaystyle{ \hat{x}, \hat{y}, \hat{z} }[/math]) |
Important note on angle brackets ([math]\displaystyle{ \langle \cdot, \cdot \rangle }[/math]): Many introductory physics textbooks and computational tools (including VPython's printed output) write coordinate vectors using angle brackets, such as [math]\displaystyle{ \vec{v} = \langle 3, -1, 2 \rangle }[/math], to visually separate vectors from points [math]\displaystyle{ (3, -1, 2) }[/math]. In mathematics and nonintroductory physics, however, this is an abuse of notation: angle brackets [math]\displaystyle{ \langle u, v \rangle }[/math] are reserved for the inner product of two vectors, which outputs a scalar rather than a vector. Writing both [math]\displaystyle{ \vec{v} = \langle v_x, v_y \rangle }[/math] and [math]\displaystyle{ \langle u, v \rangle }[/math] in the same setting creates ambiguity (especially in 2D, where both take two entries). To be unambiguous, this article strictly uses parentheses [math]\displaystyle{ (v_x, v_y, v_z) }[/math] for coordinate tuples and angle brackets [math]\displaystyle{ \langle u, v \rangle }[/math] exclusively for inner products.
Physical Examples and Visual Representation
Position and Displacement
A point's location in 3D space is described by a position vector [math]\displaystyle{ \vec{r} \in \mathbf{R}^3 }[/math] measured from a chosen origin [math]\displaystyle{ (0, 0, 0) }[/math]. Because position depends on where the origin is placed, a position vector is always anchored to a reference point. Given two position vectors [math]\displaystyle{ \vec{r}_1 }[/math] and [math]\displaystyle{ \vec{r}_2 }[/math], their difference
[math]\displaystyle{ \Delta \vec{r} = \vec{r}_2 - \vec{r}_1 }[/math]
is the relative position (or displacement) vector pointing from point 1 to point 2. Unlike position itself, displacement is independent of the choice of origin, and its norm [math]\displaystyle{ \|\vec{r}_2 - \vec{r}_1\| }[/math] equals the straight-line Euclidean distance between the two points.
Velocity
Velocity is a vector that describes how fast and in what direction an object moves. Its magnitude is the speed, and it is usually measured in m/s. The velocity vector can be found by differentiating the position vector with respect to time (if the position function is differentiable, that is).
[math]\displaystyle{ \vec{v}(t) = \frac{d\vec{r}}{dt} }[/math]
For example, if [math]\displaystyle{ \vec{r}(t) = (t, 1, 0)\ \text{m} }[/math], then:
[math]\displaystyle{ \vec{v}(t) = \frac{d\vec{r}}{dt} = (1, 0, 0)\ \text{m/s} }[/math]
The speed is the norm [math]\displaystyle{ \|\vec{v}(t)\| = \sqrt{1^2 + 0^2 + 0^2} = 1\ \text{m/s} }[/math].
Weight
Near Earth's surface, gravity exerts a downward force vector [math]\displaystyle{ \vec{F}_g }[/math] on an object of mass [math]\displaystyle{ m \gt 0 }[/math]. Choosing a coordinate system with the positive [math]\displaystyle{ y }[/math]-axis pointing upward,
[math]\displaystyle{ \vec{F}_g = (0, -mg, 0) }[/math]
where [math]\displaystyle{ g \approx 9.8\ \text{m/s}^2 }[/math] is the magnitude of the gravitational field near Earth’s surface. Weight refers to the norm [math]\displaystyle{ \|\vec{F}_g\| = mg }[/math] whereas [math]\displaystyle{ \vec{F}_g }[/math] is the gravitational force vector.
Visualizing Vectors
In [math]\displaystyle{ \mathbf{R}^2 }[/math] and [math]\displaystyle{ \mathbf{R}^3 }[/math], vectors are drawn as arrows: the length of the arrow represents the norm, and the direction of the arrow indicates which way it points. Mathematically, vectors in [math]\displaystyle{ \mathbf{R}^n }[/math] are invariant under parallel translation: sliding an arrow without changing its length or orientation produces the same vector. In physics, this invariance is useful because a vector does not always represent a literal displacement between two locations. It often describes a physical property defined at a single point (such as velocity, force, or an electric field). In diagrams, we anchor the tail of such a vector at the point where it acts.
The example below shows a velocity vector for a ball moving to the right at 5 m/s.
Units and Measurement
SI Base Units
The International System of Units (SI) is the standard measurement system in science and engineering. It defines seven base units from which all other SI units are constructed:
- meter ([math]\displaystyle{ \text{m} }[/math]) – length
- kilogram ([math]\displaystyle{ \text{kg} }[/math]) – mass
- second ([math]\displaystyle{ \text{s} }[/math]) – time
- ampere ([math]\displaystyle{ \text{A} }[/math]) – electric current
- kelvin ([math]\displaystyle{ \text{K} }[/math]) – thermodynamic temperature
- mole ([math]\displaystyle{ \text{mol} }[/math]) – amount of substance
- candela ([math]\displaystyle{ \text{cd} }[/math]) – luminous intensity
All vector quantities in introductory physics carry combinations of these base units.
Derived Units
Derived units are formed by combining SI base units through multiplication and division. Common examples include:
- newton ([math]\displaystyle{ \text{N} = \text{kg}\cdot\text{m/s}^2 }[/math]) – force
- joule ([math]\displaystyle{ \text{J} = \text{N}\cdot\text{m} = \text{kg}\cdot\text{m}^2/\text{s}^2 }[/math]) – energy and work
- watt ([math]\displaystyle{ \text{W} = \text{J/s} }[/math]) – power
- tesla ([math]\displaystyle{ \text{T} = \text{N}\cdot\text{s}/(\text{C}\cdot\text{m}) = \text{kg}/(\text{A}\cdot\text{s}^2) }[/math]) – magnetic field
Unit Conversion and Dimensional Consistency
Unit conversion changes a quantity from one unit to another while representing the same physical amount (for example, converting from centimeters to meters or from kilometers per hour to meters per second). In multi-step physics problems, careful unit conversion is essential to avoid errors and to match the units expected in formulas. In vector calculations, dimensional consistency requires that every coordinate of a vector shares the same unit.
Formal Definition
Vector Space Axioms
Formally, a vector (or point) is an element of a vector space. Let [math]\displaystyle{ \mathbf{F} }[/math] denote either the field of real numbers [math]\displaystyle{ \mathbf{R} }[/math] or the field of complex numbers [math]\displaystyle{ \mathbf{C} }[/math] (in introductory physics, [math]\displaystyle{ \mathbf{F} = \mathbf{R} }[/math]); elements of [math]\displaystyle{ \mathbf{F} }[/math] are called scalars.
A vector space over [math]\displaystyle{ \mathbf{F} }[/math] is a set [math]\displaystyle{ V }[/math] equipped with two operations:
- Addition ([math]\displaystyle{ V \times V \to V }[/math]): assigns an element [math]\displaystyle{ u + v \in V }[/math] to each pair [math]\displaystyle{ u, v \in V }[/math].
- Scalar multiplication ([math]\displaystyle{ \mathbf{F} \times V \to V }[/math]): assigns an element [math]\displaystyle{ \lambda v \in V }[/math] to each [math]\displaystyle{ \lambda \in \mathbf{F} }[/math] and [math]\displaystyle{ v \in V }[/math].
(Because both operations map back into [math]\displaystyle{ V }[/math], closure under addition and scalar multiplication is built directly into the definition.) These operations must satisfy the following axioms for all [math]\displaystyle{ u, v, w \in V }[/math] and all [math]\displaystyle{ a, b \in \mathbf{F} }[/math]:
- Commutativity: [math]\displaystyle{ u + v = v + u }[/math]
- Associativity: [math]\displaystyle{ (u + v) + w = u + (v + w) }[/math] and [math]\displaystyle{ (ab)v = a(bv) }[/math]
- Additive identity: There exists an element [math]\displaystyle{ 0 \in V }[/math] (the zero vector, distinct from the scalar [math]\displaystyle{ 0 \in \mathbf{F} }[/math]) such that [math]\displaystyle{ v + 0 = v }[/math]
- Additive inverse: For every [math]\displaystyle{ v \in V }[/math], there exists [math]\displaystyle{ w \in V }[/math] such that [math]\displaystyle{ v + w = 0 }[/math]
- Multiplicative identity: [math]\displaystyle{ 1v = v }[/math]
- Distributivity: [math]\displaystyle{ a(u + v) = au + av }[/math] and [math]\displaystyle{ (a + b)v = av + bv }[/math]
From these axioms, we can prove that the additive identity [math]\displaystyle{ 0 \in V }[/math] is unique, every vector [math]\displaystyle{ v \in V }[/math] has a unique additive inverse denoted [math]\displaystyle{ -v }[/math], and [math]\displaystyle{ (-1)v = -v }[/math] and [math]\displaystyle{ 0v = 0 }[/math] for every [math]\displaystyle{ v \in V }[/math] (do these as an exercise).
In introductory physics, we almost always work in the real vector spaces [math]\displaystyle{ \mathbf{R}^2 }[/math] (the plane) or [math]\displaystyle{ \mathbf{R}^3 }[/math] (ordinary 3D space), which are special cases of [math]\displaystyle{ \mathbf{R}^n }[/math]—the set of all ordered lists of [math]\displaystyle{ n }[/math] real numbers, such as [math]\displaystyle{ v = (v_x, v_y, v_z) \in \mathbf{R}^3 }[/math], with coordinate-wise addition and scalar multiplication. For example, [math]\displaystyle{ v = (1, 0, 0) \in \mathbf{R}^3 }[/math] is a vector of length [math]\displaystyle{ 1 }[/math] pointing along the positive [math]\displaystyle{ x }[/math]-axis.
Inner Products and Norms
A general vector space does not necessarily include a notion of length or angle. To introduce geometry, we equip a real vector space [math]\displaystyle{ V }[/math] with an inner product, which is a function assigning a real scalar [math]\displaystyle{ \langle u, v \rangle \in \mathbf{R} }[/math] to each pair [math]\displaystyle{ u, v \in V }[/math] such that, for all [math]\displaystyle{ u, v, w \in V }[/math] and [math]\displaystyle{ \lambda \in \mathbf{R} }[/math]:
- Positive definiteness: [math]\displaystyle{ \langle v, v \rangle \ge 0 }[/math], with [math]\displaystyle{ \langle v, v \rangle = 0 }[/math] if and only if [math]\displaystyle{ v = 0 }[/math].
- Linearity in the first slot: [math]\displaystyle{ \langle u + w, v \rangle = \langle u, v \rangle + \langle w, v \rangle }[/math] and [math]\displaystyle{ \langle \lambda u, v \rangle = \lambda \langle u, v \rangle }[/math].
- Symmetry: [math]\displaystyle{ \langle u, v \rangle = \langle v, u \rangle }[/math] (which, combined with linearity in the first slot, also guarantees linearity in the second slot).
A vector space equipped with an inner product is called an inner product space. In [math]\displaystyle{ \mathbf{R}^n }[/math], the standard Euclidean inner product (which we call the dot product) of [math]\displaystyle{ u = (u_1, \dots, u_n) }[/math] and [math]\displaystyle{ v = (v_1, \dots, v_n) }[/math] is defined by:
[math]\displaystyle{ \langle u, v \rangle = u_1 v_1 + u_2 v_2 + \cdots + u_n v_n = \sum_{i=1}^{n} u_i v_i }[/math]
From the inner product, we define the norm (commonly called magnitude in physics) of a vector [math]\displaystyle{ v \in \mathbf{R}^n }[/math] as the nonnegative scalar:
[math]\displaystyle{ \|v\| = \sqrt{\langle v, v \rangle} = \sqrt{v_1^2 + v_2^2 + \cdots + v_n^2} = \sqrt{\sum_{i=1}^{n} v_i^2} }[/math]
In 3D Cartesian space, for [math]\displaystyle{ v = (v_x, v_y, v_z) \in \mathbf{R}^3 }[/math], this is the familiar Pythagorean formula:
[math]\displaystyle{ \|v\| = \sqrt{v_x^2 + v_y^2 + v_z^2} }[/math]
Unit Vectors
A unit vector is a vector with norm [math]\displaystyle{ 1 }[/math]. For any nonzero vector [math]\displaystyle{ v \in \mathbf{R}^n }[/math], scaling [math]\displaystyle{ v }[/math] by the positive scalar [math]\displaystyle{ \frac{1}{\|v\|} }[/math] yields a unit vector in the same direction (a process called normalization):
[math]\displaystyle{ \hat{v} = \frac{1}{\|v\|}v }[/math]
For example, if [math]\displaystyle{ \vec{v} = (v_x, v_y, v_z) \in \mathbf{R}^3 }[/math] is nonzero, then [math]\displaystyle{ \hat{v} = \frac{1}{\|\vec{v}\|}(v_x, v_y, v_z) }[/math]. Note that unit vectors carry no physical units because the units of [math]\displaystyle{ \vec{v} }[/math] and [math]\displaystyle{ \|\vec{v}\| }[/math] cancel.
Orthonormal Bases
Two vectors [math]\displaystyle{ u, v }[/math] in an inner product space are called orthogonal if [math]\displaystyle{ \langle u, v \rangle = 0 }[/math]. A list of vectors [math]\displaystyle{ e_1, \dots, e_n }[/math] is orthonormal if every vector has norm [math]\displaystyle{ 1 }[/math] and every pair of distinct vectors is orthogonal ([math]\displaystyle{ \langle e_j, e_k \rangle = 0 }[/math] for [math]\displaystyle{ j \neq k }[/math]).
The standard basis of [math]\displaystyle{ \mathbf{R}^3 }[/math] is an orthonormal basis consisting of the three unit vectors:
[math]\displaystyle{ \hat{x} = (1, 0, 0), \qquad \hat{y} = (0, 1, 0), \qquad \hat{z} = (0, 0, 1) }[/math]
(also sometimes written [math]\displaystyle{ \hat{i}, \hat{j}, \hat{k} }[/math] in physics and engineering). We can think of a basis as a fundamental list of vectors for a vector space that gives each component its meaning. For the standard basis, our list gives each component a meaning that it is the x, y, or z direction. This basis is orthonormal, so every vector [math]\displaystyle{ v \in \mathbf{R}^3 }[/math] can be written uniquely as a linear combination whose coefficients are simply the inner products of [math]\displaystyle{ v }[/math] with each basis vector:
[math]\displaystyle{ v = \langle v, \hat{x} \rangle \hat{x} + \langle v, \hat{y} \rangle \hat{y} + \langle v, \hat{z} \rangle \hat{z} }[/math]
Other coordinate systems use different local orthonormal bases that vary with position, such as [math]\displaystyle{ \hat{r} }[/math] and [math]\displaystyle{ \hat{\theta} }[/math] in polar coordinates.
Direction and Angles
In [math]\displaystyle{ \mathbf{R}^2 }[/math] and [math]\displaystyle{ \mathbf{R}^3 }[/math], scalar multiplication gives a direct geometric interpretation of direction: for a nonzero [math]\displaystyle{ v }[/math], multiplying by [math]\displaystyle{ \lambda \gt 0 }[/math] scales its norm without changing its direction, while multiplying by [math]\displaystyle{ \lambda \lt 0 }[/math] reverses its direction (with [math]\displaystyle{ (-1)v = -v }[/math] pointing directly opposite to [math]\displaystyle{ v }[/math]). The zero vector [math]\displaystyle{ 0 = (0, \dots, 0) }[/math] has norm [math]\displaystyle{ 0 }[/math] and no direction.
To quantify relative direction between any two nonzero vectors [math]\displaystyle{ u, v \in \mathbf{R}^n }[/math], we rely on the Cauchy–Schwarz inequality:
[math]\displaystyle{ |\langle u, v \rangle| \le \|u\|\|v\| }[/math]
Dividing by [math]\displaystyle{ \|u\|\|v\| \gt 0 }[/math] guarantees that [math]\displaystyle{ -1 \le \frac{\langle u, v \rangle}{\|u\|\|v\|} \le 1 }[/math]. Because of this, there exists a unique angle [math]\displaystyle{ \theta \in [0, \pi] }[/math] between [math]\displaystyle{ u }[/math] and [math]\displaystyle{ v }[/math] where:
[math]\displaystyle{ \cos\theta = \frac{\langle u, v \rangle}{\|u\|\|v\|} }[/math]
Two nonzero vectors are orthogonal ([math]\displaystyle{ \langle u, v \rangle = 0 }[/math]) if and only if [math]\displaystyle{ \cos\theta = 0 }[/math], meaning they are perpendicular ([math]\displaystyle{ \theta = \frac{\pi}{2} }[/math]).
Unsigned angle vs. 2D polar direction angle: Notice that the inner-product angle [math]\displaystyle{ \theta = \arccos\left(\frac{\langle v, \hat{x}\rangle}{\|v\|}\right) = \arccos\left(\frac{v_x}{\|v\|}\right) }[/math] always lies in [math]\displaystyle{ [0, \pi] }[/math] and therefore cannot distinguish whether a 2D vector points above or below the [math]\displaystyle{ x }[/math]-axis (it loses the sign of [math]\displaystyle{ v_y }[/math]). In introductory 2D physics, we instead specify a vector's full orientation using a signed polar direction angle [math]\displaystyle{ \phi \in (-\pi, \pi] }[/math] (or [math]\displaystyle{ [0, 2\pi) }[/math]) measured counterclockwise from the positive [math]\displaystyle{ x }[/math]-axis. For a nonzero vector [math]\displaystyle{ v = (v_x, v_y) \in \mathbf{R}^2 }[/math]:
- If [math]\displaystyle{ v_x \gt 0 }[/math]: [math]\displaystyle{ \phi = \arctan\left(\frac{v_y}{v_x}\right) }[/math].
- If [math]\displaystyle{ v_x \lt 0 }[/math]: [math]\displaystyle{ \phi = \arctan\left(\frac{v_y}{v_x}\right) + \pi }[/math] (or [math]\displaystyle{ -\pi }[/math], depending on the chosen branch) to place [math]\displaystyle{ \phi }[/math] in the second or third quadrant.
- If [math]\displaystyle{ v_x = 0 }[/math]: [math]\displaystyle{ \phi = \frac{\pi}{2} }[/math] ([math]\displaystyle{ 90^\circ }[/math]) when [math]\displaystyle{ v_y \gt 0 }[/math], and [math]\displaystyle{ \phi = -\frac{\pi}{2} }[/math] ([math]\displaystyle{ 270^\circ }[/math]) when [math]\displaystyle{ v_y \lt 0 }[/math].
Vector Operations
Vector addition and scalar multiplication are built into every vector space. The dot product and cross product add geometric structure for measuring projections, angles, areas, and orientations. Below, formulas are written in [math]\displaystyle{ \mathbf{R}^3 }[/math] for introductory physics, with notes on how they generalize to [math]\displaystyle{ \mathbf{R}^n }[/math].
Addition and Subtraction
In [math]\displaystyle{ \mathbf{R}^n }[/math], vector addition is defined coordinate-wise. For [math]\displaystyle{ \vec{a} = (a_x, a_y, a_z) }[/math] and [math]\displaystyle{ \vec{b} = (b_x, b_y, b_z) }[/math] in [math]\displaystyle{ \mathbf{R}^3 }[/math]:
[math]\displaystyle{ \vec{a} + \vec{b} = (a_x + b_x,\; a_y + b_y,\; a_z + b_z) }[/math]
By the vector space axioms, addition is commutative ([math]\displaystyle{ \vec{a} + \vec{b} = \vec{b} + \vec{a} }[/math]) and associative ([math]\displaystyle{ (\vec{a} + \vec{b}) + \vec{c} = \vec{a} + (\vec{b} + \vec{c}) }[/math]). Geometrically, placing the tail of [math]\displaystyle{ \vec{b} }[/math] at the head of [math]\displaystyle{ \vec{a} }[/math] yields the resultant vector [math]\displaystyle{ \vec{a} + \vec{b} }[/math], running from the tail of [math]\displaystyle{ \vec{a} }[/math] to the head of [math]\displaystyle{ \vec{b} }[/math].
Every vector [math]\displaystyle{ \vec{b} }[/math] has a unique additive inverse [math]\displaystyle{ -\vec{b} = (-1)\vec{b} }[/math], which has the same norm as [math]\displaystyle{ \vec{b} }[/math] but points in the opposite direction. Vector subtraction is formally defined as adding this additive inverse; for 3-dimensional vectors:
[math]\displaystyle{ \vec{a} - \vec{b} = \vec{a} + (-\vec{b}) = (a_x - b_x,\; a_y - b_y,\; a_z - b_z) }[/math]
Scalar Multiplication
For a scalar [math]\displaystyle{ \lambda \in \mathbf{R} }[/math] and a vector [math]\displaystyle{ \vec{a} = (a_x, a_y, a_z) \in \mathbf{R}^3 }[/math], scalar multiplication multiplies every coordinate by [math]\displaystyle{ \lambda }[/math]:
[math]\displaystyle{ \lambda \vec{a} = (\lambda a_x,\; \lambda a_y,\; \lambda a_z) }[/math]
This scales the norm by [math]\displaystyle{ |\lambda| }[/math] (that is, [math]\displaystyle{ \|\lambda \vec{a}\| = |\lambda|\|\vec{a}\| }[/math]). If [math]\displaystyle{ \lambda \gt 0 }[/math], direction is preserved; if [math]\displaystyle{ \lambda \lt 0 }[/math], direction is reversed; if [math]\displaystyle{ \lambda = 0 }[/math], the result is the zero vector [math]\displaystyle{ \vec{0} }[/math].
Vector spaces do not include a separate "division by a scalar" axiom (nor is division by a vector defined). Instead, because every nonzero scalar [math]\displaystyle{ \lambda \in \mathbf{R} }[/math] has a unique multiplicative inverse [math]\displaystyle{ \frac{1}{\lambda} \in \mathbf{R} }[/math], dividing a vector by [math]\displaystyle{ \lambda \neq 0 }[/math] is simply scalar multiplication by [math]\displaystyle{ \frac{1}{\lambda} }[/math]:
[math]\displaystyle{ \frac{\vec{a}}{\lambda} = \frac{1}{\lambda}\vec{a} = \left(\frac{a_x}{\lambda},\; \frac{a_y}{\lambda},\; \frac{a_z}{\lambda}\right) }[/math]
Dot Product
The dot product (or scalar product) is the Euclidean inner product on [math]\displaystyle{ \mathbf{R}^n }[/math]. For [math]\displaystyle{ \vec{a} = (a_x, a_y, a_z) }[/math] and [math]\displaystyle{ \vec{b} = (b_x, b_y, b_z) }[/math] in [math]\displaystyle{ \mathbf{R}^3 }[/math]:
[math]\displaystyle{ \vec{a} \cdot \vec{b} = \langle \vec{a}, \vec{b} \rangle = a_x b_x + a_y b_y + a_z b_z }[/math]
Unlike scalar multiplication, the dot product takes two vectors and outputs a scalar. For nonzero vectors separated by angle [math]\displaystyle{ \theta \in [0, \pi] }[/math], it satisfies:
[math]\displaystyle{ \vec{a} \cdot \vec{b} = \|\vec{a}\|\|\vec{b}\|\cos\theta }[/math]
Geometrically, [math]\displaystyle{ \vec{a} \cdot \hat{b} = \|\vec{a}\|\cos\theta }[/math] gives the signed projection of [math]\displaystyle{ \vec{a} }[/math] onto the direction of [math]\displaystyle{ \vec{b} }[/math]—which is why mechanical work by a constant force is written [math]\displaystyle{ W = \vec{F} \cdot \Delta\vec{r} }[/math]. While the zero vector is formally orthogonal to every vector ([math]\displaystyle{ \vec{0} \cdot \vec{v} = 0 }[/math]), two nonzero vectors are perpendicular ([math]\displaystyle{ \theta = \frac{\pi}{2} }[/math]) if and only if [math]\displaystyle{ \vec{a} \cdot \vec{b} = 0 }[/math].
Cross Product
In [math]\displaystyle{ \mathbf{R}^3 }[/math], the cross product (or vector product) of [math]\displaystyle{ \vec{a} = (a_x, a_y, a_z) }[/math] and [math]\displaystyle{ \vec{b} = (b_x, b_y, b_z) }[/math] is a new vector defined in components by:
[math]\displaystyle{ \vec{a} \times \vec{b} = (a_y b_z - a_z b_y,\; a_z b_x - a_x b_z,\; a_x b_y - a_y b_x) }[/math]
Written in the standard orthonormal basis [math]\displaystyle{ \hat{i}, \hat{j}, \hat{k} }[/math], this is equivalently:
[math]\displaystyle{ \vec{a} \times \vec{b} = (a_y b_z - a_z b_y)\hat{i} - (a_x b_z - a_z b_x)\hat{j} + (a_x b_y - a_y b_x)\hat{k} }[/math]
The cross product is bilinear (linear in each argument separately) and anticommutative—swapping the order reverses the sign: [math]\displaystyle{ \vec{b} \times \vec{a} = -(\vec{a} \times \vec{b}) }[/math]. In particular, [math]\displaystyle{ \vec{a} \times \vec{a} = \vec{0} }[/math] for every vector [math]\displaystyle{ \vec{a} }[/math].
A standard mnemonic for computing [math]\displaystyle{ \vec{a} \times \vec{b} }[/math] is the formal determinant of a [math]\displaystyle{ 3 \times 3 }[/math] symbolic matrix, expanded along the first row (observing the alternating [math]\displaystyle{ +, -, + }[/math] signs of cofactor expansion):
[math]\displaystyle{ \vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix} = \begin{vmatrix} a_y & a_z \\ b_y & b_z \end{vmatrix}\hat{i} - \begin{vmatrix} a_x & a_z \\ b_x & b_z \end{vmatrix}\hat{j} + \begin{vmatrix} a_x & a_y \\ b_x & b_y \end{vmatrix}\hat{k} }[/math]
Online resources for checking computations:
Geometrically, the norm of the cross product equals the area of the parallelogram spanned by [math]\displaystyle{ \vec{a} }[/math] and [math]\displaystyle{ \vec{b} }[/math]:
[math]\displaystyle{ \|\vec{a} \times \vec{b}\| = \|\vec{a}\|\|\vec{b}\|\sin\theta }[/math]
where [math]\displaystyle{ \theta \in [0, \pi] }[/math] is the angle between [math]\displaystyle{ \vec{a} }[/math] and [math]\displaystyle{ \vec{b} }[/math]. Its direction is orthogonal to both [math]\displaystyle{ \vec{a} }[/math] and [math]\displaystyle{ \vec{b} }[/math] and is uniquely determined by the Right Hand Rule. In introductory physics, the cross product governs rotational and electromagnetic phenomena such as torque ([math]\displaystyle{ \vec{\tau} = \vec{r} \times \vec{F} }[/math]), angular momentum ([math]\displaystyle{ \vec{L} = \vec{r} \times \vec{p} }[/math]), and the magnetic Lorentz force ([math]\displaystyle{ \vec{F}_B = q(\vec{v} \times \vec{B}) }[/math]).
Component Pattern ("X-Method")
A fast computational pattern avoids writing out the full [math]\displaystyle{ 3 \times 3 }[/math] determinant. Consider:
[math]\displaystyle{ \vec{a} = (3, -2, 4), \qquad \vec{b} = (-1, 6, 3) }[/math]
To compute [math]\displaystyle{ \vec{c} = \vec{a} \times \vec{b} = (c_x, c_y, c_z) }[/math], list each vector's components vertically and append the first component at the bottom:
[math]\displaystyle{ \begin{pmatrix} a_x \\ a_y \\ a_z \\ a_x \end{pmatrix} = \begin{pmatrix} 3 \\ -2 \\ 4 \\ 3 \end{pmatrix}, \qquad \begin{pmatrix} b_x \\ b_y \\ b_z \\ b_x \end{pmatrix} = \begin{pmatrix} -1 \\ 6 \\ 3 \\ -1 \end{pmatrix} }[/math]
- For [math]\displaystyle{ c_x }[/math], cross-multiply rows 2 and 3 ([math]\displaystyle{ a_y b_z - a_z b_y }[/math]):
- [math]\displaystyle{ c_x = (-2)(3) - (4)(6) = -6 - 24 = -30 }[/math]
- For [math]\displaystyle{ c_y }[/math], cross-multiply rows 3 and 4 ([math]\displaystyle{ a_z b_x - a_x b_z }[/math]):
- [math]\displaystyle{ c_y = (4)(-1) - (3)(3) = -4 - 9 = -13 }[/math]
- For [math]\displaystyle{ c_z }[/math], cross-multiply rows 1 and 2 ([math]\displaystyle{ a_x b_y - a_y b_x }[/math]):
- [math]\displaystyle{ c_z = (3)(6) - (-2)(-1) = 18 - 2 = 16 }[/math]
Thus [math]\displaystyle{ \vec{a} \times \vec{b} = (-30, -13, 16) }[/math]. As a quick sanity check, verify orthogonality via the dot product: [math]\displaystyle{ \vec{a} \cdot \vec{c} = 3(-30) + (-2)(-13) + 4(16) = 0 }[/math].
Advanced Note: What the Cross Product Really Measures (and Why 3D Is Special)
Optional Reading (Geometric and Linear Algebra Interpretation)
At first glance, the component formula for [math]\displaystyle{ \vec{a} \times \vec{b} }[/math] seems arbitrary, and it is unclear where the [math]\displaystyle{ 3 \times 3 }[/math] determinant comes from. Two viewpoints make both completely transparent and explain what happens outside 3D.
1. Components as Signed Shadow Areas
Look at the three components of [math]\displaystyle{ \vec{c} = \vec{a} \times \vec{b} }[/math]:
[math]\displaystyle{ c_x = a_y b_z - a_z b_y, \qquad c_y = a_z b_x - a_x b_z, \qquad c_z = a_x b_y - a_y b_x }[/math]
In 2D, the expression [math]\displaystyle{ a_x b_y - a_y b_x }[/math] is the signed area of the parallelogram spanned by [math]\displaystyle{ (a_x, a_y) }[/math] and [math]\displaystyle{ (b_x, b_y) }[/math] (positive if rotating from [math]\displaystyle{ \vec{a} }[/math] to [math]\displaystyle{ \vec{b} }[/math] is counterclockwise, negative if clockwise). Therefore, the three components of [math]\displaystyle{ \vec{a} \times \vec{b} }[/math] can be seen as the signed areas of the shadows cast by the 3D parallelogram onto the three coordinate planes:
- [math]\displaystyle{ c_x }[/math] is the signed area of the shadow on the [math]\displaystyle{ yz }[/math]-plane (perpendicular to the [math]\displaystyle{ x }[/math]-axis).
- [math]\displaystyle{ c_y }[/math] is the signed area of the shadow on the [math]\displaystyle{ zx }[/math]-plane (perpendicular to the [math]\displaystyle{ y }[/math]-axis).
- [math]\displaystyle{ c_z }[/math] is the signed area of the shadow on the [math]\displaystyle{ xy }[/math]-plane (perpendicular to the [math]\displaystyle{ z }[/math]-axis).
Then the formula [math]\displaystyle{ \|\vec{a} \times \vec{b}\| = \sqrt{c_x^2 + c_y^2 + c_z^2} }[/math] is a 3D Pythagorean theorem for areas: the squared area of any tilted parallelogram equals the sum of the squared areas of its three coordinate-plane shadows.
2. The Determinant Formula as Signed Volume
Fix two vectors [math]\displaystyle{ \vec{a}, \vec{b} \in \mathbf{R}^3 }[/math]. For any third vector [math]\displaystyle{ \vec{v} = (v_x, v_y, v_z) \in \mathbf{R}^3 }[/math], the [math]\displaystyle{ 3 \times 3 }[/math] determinant
[math]\displaystyle{ V(\vec{v}) = \det\begin{pmatrix} v_x & v_y & v_z \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{pmatrix} }[/math]
gives the signed volume of the parallelepiped spanned by [math]\displaystyle{ \vec{a} }[/math], [math]\displaystyle{ \vec{b} }[/math], and [math]\displaystyle{ \vec{v} }[/math]. Expanding along the first row shows that [math]\displaystyle{ V(\vec{v}) }[/math] is simply a linear combination of [math]\displaystyle{ v_x, v_y, v_z }[/math]:
[math]\displaystyle{ V(\vec{v}) = (a_y b_z - a_z b_y)v_x + (a_z b_x - a_x b_z)v_y + (a_x b_y - a_y b_x)v_z = \langle \vec{c}, \vec{v} \rangle }[/math]
In linear algebra, the cross product [math]\displaystyle{ \vec{c} = \vec{a} \times \vec{b} }[/math] is defined as the unique vector whose inner product with any [math]\displaystyle{ \vec{v} }[/math] computes this signed volume: [math]\displaystyle{ \langle \vec{a} \times \vec{b}, \vec{v} \rangle = V(\vec{v}) }[/math]. This single equation explains every property of the cross product at once:
- Why the determinant works: Replacing [math]\displaystyle{ (v_x, v_y, v_z) }[/math] with [math]\displaystyle{ (\hat{i}, \hat{j}, \hat{k}) }[/math] is just a compact way of collecting the coefficients of [math]\displaystyle{ v_x, v_y, v_z }[/math] into the vector [math]\displaystyle{ \vec{c} }[/math].
- Orthogonality: Setting [math]\displaystyle{ \vec{v} = \vec{a} }[/math] or [math]\displaystyle{ \vec{v} = \vec{b} }[/math] flattens the parallelepiped to volume [math]\displaystyle{ 0 }[/math], so [math]\displaystyle{ \langle \vec{a} \times \vec{b}, \vec{a} \rangle = 0 }[/math] and [math]\displaystyle{ \langle \vec{a} \times \vec{b}, \vec{b} \rangle = 0 }[/math].
- Magnitude = Base Area: Setting [math]\displaystyle{ \vec{v} = \hat{n} }[/math] (the unit vector pointing in the direction of [math]\displaystyle{ \vec{a} \times \vec{b} }[/math]) builds a parallelepiped of height [math]\displaystyle{ 1 }[/math] over the base spanned by [math]\displaystyle{ \vec{a} }[/math] and [math]\displaystyle{ \vec{b} }[/math]. Its volume equals [math]\displaystyle{ (\text{base area}) \times 1 }[/math], while [math]\displaystyle{ \langle \vec{a} \times \vec{b}, \hat{n} \rangle = \|\vec{a} \times \vec{b}\| }[/math].
- Right-hand rule: Setting [math]\displaystyle{ \vec{v} = \vec{a} \times \vec{b} }[/math] gives volume [math]\displaystyle{ \|\vec{a} \times \vec{b}\|^2 \gt 0 }[/math] (for non-parallel [math]\displaystyle{ \vec{a}, \vec{b} }[/math]), forcing [math]\displaystyle{ (\vec{a}, \vec{b}, \vec{a} \times \vec{b}) }[/math] to have positive (right-handed) orientation.
3. Why Two-Vector Cross Products Are Special to 3D (and the 7D Exception)
Suppose you have two non-parallel vectors [math]\displaystyle{ a, b \in \mathbf{R}^n }[/math] and want a vector [math]\displaystyle{ v \in \mathbf{R}^n }[/math] orthogonal to both. That means solving two linear equations—[math]\displaystyle{ \langle a, v \rangle = 0 }[/math] and [math]\displaystyle{ \langle b, v \rangle = 0 }[/math]—in [math]\displaystyle{ n }[/math] unknowns, leaving [math]\displaystyle{ n - 2 }[/math] free parameters:
- In [math]\displaystyle{ \mathbf{R}^2 }[/math] ([math]\displaystyle{ n = 2 }[/math]): [math]\displaystyle{ 2 - 2 = 0 }[/math] free parameters. Only the zero vector is orthogonal to both [math]\displaystyle{ a }[/math] and [math]\displaystyle{ b }[/math].
- In [math]\displaystyle{ \mathbf{R}^3 }[/math] ([math]\displaystyle{ n = 3 }[/math]): [math]\displaystyle{ 3 - 2 = 1 }[/math] free parameter. All orthogonal vectors lie along a single line, so specifying magnitude and the right-hand rule picks out a unique vector.
- In [math]\displaystyle{ \mathbf{R}^4 }[/math] ([math]\displaystyle{ n = 4 }[/math]): [math]\displaystyle{ 4 - 2 = 2 }[/math] free parameters—an entire 2D plane of orthogonal vectors. For example, both [math]\displaystyle{ (0, 0, 1, 0) }[/math] and [math]\displaystyle{ (0, 0, 0, 1) }[/math] (and every linear combination of them) are perpendicular to [math]\displaystyle{ (1, 0, 0, 0) }[/math] and [math]\displaystyle{ (0, 1, 0, 0) }[/math], so "perpendicular to both" no longer specifies a single direction.
Physics uses the cross product to describe rotations and oriented planes (such as the plane of a spinning wheel or a current loop). Every rotation takes place in a 2D plane, not inherently around a line:
- In 2D, there is only [math]\displaystyle{ \binom{2}{2} = 1 }[/math] coordinate plane ([math]\displaystyle{ xy }[/math]), so rotation is just a single signed scalar (clockwise or counterclockwise).
- In 3D, there are [math]\displaystyle{ \binom{3}{2} = 3 }[/math] coordinate planes ([math]\displaystyle{ yz, zx, xy }[/math])—which happens to equal the [math]\displaystyle{ 3 }[/math] coordinate axes ([math]\displaystyle{ x, y, z }[/math]). This coincidence lets us pair each plane of rotation with its unique normal axis and package torque, angular momentum, and magnetic fields as 3D vectors.
- In 4D, there are [math]\displaystyle{ \binom{4}{2} = 6 }[/math] independent coordinate planes ([math]\displaystyle{ xy, xz, xw, yz, yw, zw }[/math]), which cannot be stored in a 4-component vector. That is why in 4D relativity, angular momentum and the electromagnetic field are represented as [math]\displaystyle{ 4 \times 4 }[/math] antisymmetric matrices (which have [math]\displaystyle{ 6 }[/math] independent entries—one per coordinate plane) rather than 4-vectors.
The signed-volume construction [math]\displaystyle{ \langle c, v \rangle = \det(v, v_1, \dots, v_{n-1}) }[/math] generalizes cleanly to any dimension [math]\displaystyle{ n }[/math] if you supply [math]\displaystyle{ n - 1 }[/math] vectors instead of [math]\displaystyle{ 2 }[/math] (leaving [math]\displaystyle{ n - (n - 1) = 1 }[/math] perpendicular axis). In 2D, it takes [math]\displaystyle{ 1 }[/math] vector [math]\displaystyle{ (a_x, a_y) }[/math] and returns [math]\displaystyle{ (-a_y, a_x) }[/math] (a [math]\displaystyle{ 90^\circ }[/math] counterclockwise rotation); in 3D, it takes [math]\displaystyle{ 2 }[/math] vectors (the standard cross product); in 4D, it takes [math]\displaystyle{ 3 }[/math] vectors to determine a single perpendicular vector.
Finally, what if we relax the requirement that orthogonality alone determine a unique line, and simply ask for any bilinear product of two vectors in [math]\displaystyle{ \mathbf{R}^n }[/math] ([math]\displaystyle{ n \ge 2 }[/math]) that is orthogonal to both inputs and has norm equal to the parallelogram area ([math]\displaystyle{ \|a \times b\|^2 = \|a\|^2\|b\|^2 - \langle a, b \rangle^2 }[/math])? Remarkably, such a cross product exists only in [math]\displaystyle{ n = 3 }[/math] and [math]\displaystyle{ n = 7 }[/math]. In [math]\displaystyle{ \mathbf{R}^7 }[/math], the space orthogonal to two non-parallel vectors is [math]\displaystyle{ 7 - 2 = 5 }[/math]-dimensional, so orthogonality does not select a direction; instead, a 7D cross product picks out a specific perpendicular vector using the multiplication table of the 8-dimensional octonions (just as the 3D cross product comes from the 4-dimensional quaternions). Because that choice depends on the octonion multiplication rule, the 7D cross product is not unique up to sign, is not preserved by all 7D rotations, and loses the general vector triple product identity (since octonion multiplication is non-associative).
Vector Product Identities
When combining dot products and cross products in [math]\displaystyle{ \mathbf{R}^3 }[/math], two identities are particularly useful:
- Orthogonality: [math]\displaystyle{ (\vec{w} \times \vec{v}) \cdot \vec{v} = 0 }[/math] and [math]\displaystyle{ (\vec{w} \times \vec{v}) \cdot \vec{w} = 0 }[/math]. Because [math]\displaystyle{ \vec{w} \times \vec{v} }[/math] is orthogonal to both [math]\displaystyle{ \vec{w} }[/math] and [math]\displaystyle{ \vec{v} }[/math], its dot product with either vanishes.
- Scalar Triple Product: [math]\displaystyle{ \vec{a} \cdot (\vec{b} \times \vec{c}) = (\vec{a} \times \vec{b}) \cdot \vec{c} = \vec{b} \cdot (\vec{c} \times \vec{a}) }[/math]. This scalar equals the determinant of the [math]\displaystyle{ 3 \times 3 }[/math] matrix whose rows (or columns) are [math]\displaystyle{ \vec{a}, \vec{b}, \vec{c} }[/math], and its absolute value equals the volume of the parallelepiped spanned by the vectors. Cyclic permutations of these vectors preserve the volume and swapping any two vectors flips the sign.
Representations of a Vector
A physical vector or an element of an abstract vector space [math]\displaystyle{ V }[/math] exists independently of any coordinate system. Once an ordered basis is chosen, it establishes a one-to-one correspondence (isomorphism [math]\displaystyle{ V \cong \mathbf{R}^n }[/math]) that assigns each vector a unique list of coordinates. Depending on the problem, we choose whichever representation is most convenient; all carry identical information.
Magnitude and Direction Form
In this form, we specify:
- The norm (magnitude) [math]\displaystyle{ \|\vec{a}\| }[/math], and
- The orientation (an angle, cardinal direction, or axis).
For example, "a [math]\displaystyle{ 5\ \text{m} }[/math] displacement at [math]\displaystyle{ 36.9^\circ }[/math] above the horizontal" is in this form. This form is intuitive and often used in word problems and real-life descriptions.
Component Form
Once a basis is decided, we break the vector into components along the coordinate axes. In [math]\displaystyle{ \mathbf{R}^3 }[/math]:
[math]\displaystyle{ \vec{a} = (a_x, a_y, a_z) }[/math]
For example, [math]\displaystyle{ (4, 3, 0) }[/math] means the vector extends 4 units along [math]\displaystyle{ +x }[/math], 3 along [math]\displaystyle{ y }[/math], and 0 along [math]\displaystyle{ z }[/math]. Most algebraic operations are done using component form. Computers also typically store vectors this way (at least in the abstract sense).
Unit Vector Form
Using the standard orthonormal basis [math]\displaystyle{ \hat{i}, \hat{j}, \hat{k} }[/math] (or alternatively written as [math]\displaystyle{ \hat{x}, \hat{y}, \hat{z} }[/math]) of [math]\displaystyle{ \mathbf{R}^3 }[/math], every vector is written uniquely as a linear combination:
[math]\displaystyle{ \vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k} }[/math]
For example, [math]\displaystyle{ (4, 3, 0) = 4\hat{i} + 3\hat{j} }[/math]. Unit vector form and component form carry identical numerical information; basis form makes the underlying linear combination explicit, which can be useful when working in other bases.
In [math]\displaystyle{ n }[/math] dimensions, specifying a vector always requires [math]\displaystyle{ n }[/math] numbers in the field (which in introductory physics is almost always the real numbers), regardless of the representation. In [math]\displaystyle{ \mathbf{R}^3 }[/math], Cartesian component form uses [math]\displaystyle{ 3 }[/math] coordinates [math]\displaystyle{ (a_x, a_y, a_z) }[/math], while spherical magnitude–direction form uses [math]\displaystyle{ 1 }[/math] norm and [math]\displaystyle{ 2 }[/math] angles [math]\displaystyle{ (\|\vec{a}\|, \theta, \phi) }[/math].
Converting Between Forms
In [math]\displaystyle{ \mathbf{R}^2 }[/math], we convert between Cartesian components [math]\displaystyle{ (a_x, a_y) }[/math] and polar magnitude–direction form [math]\displaystyle{ (\|\vec{a}\|, \phi) }[/math] with [math]\displaystyle{ \phi \in (-\pi, \pi] }[/math] using the inner product and right-triangle trigonometry:
- Components to magnitude and direction:
- [math]\displaystyle{ \|\vec{a}\| = \sqrt{\langle \vec{a}, \vec{a} \rangle} = \sqrt{a_x^2 + a_y^2} }[/math]
- [math]\displaystyle{ \phi = \begin{cases} \arctan\!\left(\frac{a_y}{a_x}\right) & \text{if } a_x \gt 0, \\ \arctan\!\left(\frac{a_y}{a_x}\right) + \pi & \text{if } a_x \lt 0 \text{ and } a_y \ge 0, \\ \arctan\!\left(\frac{a_y}{a_x}\right) - \pi & \text{if } a_x \lt 0 \text{ and } a_y \lt 0, \\ \frac{\pi}{2} & \text{if } a_x = 0 \text{ and } a_y \gt 0, \\ -\frac{\pi}{2} & \text{if } a_x = 0 \text{ and } a_y \lt 0. \end{cases} }[/math]
- (For [math]\displaystyle{ \vec{a} = (0, 0) }[/math], [math]\displaystyle{ \phi }[/math] is undefined. This piecewise formula is equivalent to the two-argument function [math]\displaystyle{ \operatorname{atan2}(a_y, a_x) }[/math] used in computing; to express [math]\displaystyle{ \phi }[/math] in [math]\displaystyle{ [0, 2\pi) }[/math] instead, add [math]\displaystyle{ 2\pi }[/math] whenever [math]\displaystyle{ \phi \lt 0 }[/math].)
- Magnitude and direction to components (via inner product projections onto the orthonormal basis [math]\displaystyle{ \hat{x}, \hat{y} }[/math]):
- [math]\displaystyle{ a_x = \langle \vec{a}, \hat{x} \rangle = \|\vec{a}\|\cos\phi }[/math]
- [math]\displaystyle{ a_y = \langle \vec{a}, \hat{y} \rangle = \|\vec{a}\|\sin\phi }[/math]
Vectors in VPython
In VPython (used in GlowScript), vectors are represented by the type vec or vector. The constructor takes three arguments: the x, y, and z components:
velocity = vec(3, -1, 2)
This creates a vector called velocity with coordinates [math]\displaystyle{ (3, -1, 2) }[/math]. (Note that when printed to the console, VPython displays vectors using angle brackets, e.g., <3, -1, 2>, following introductory physics convention rather than inner-product notation.)
In VPython's default view, [math]\displaystyle{ +x }[/math] points right, [math]\displaystyle{ +y }[/math] points upward, and [math]\displaystyle{ +z }[/math] points out of the screen toward the viewer.
Modifying Vectors
Individual components can be accessed or updated with .x, .y, and .z:
velocity.x = 5 # changes velocity from (3, -1, 2) to (5, -1, 2)
Helpful Vector Functions
Magnitude
VPython provides the mag function to compute the magnitude (Euclidean norm) of a vector:
velocity = vec(3, -1, 2) speed = mag(velocity) # magnitude of velocity
Normalize
To obtain a unit vector in the same direction (normalize a vector), use norm:
v = vec(5, 0, 0) v_hat = norm(v) # unit vector (1, 0, 0)
Dot and Cross Product
The functions dot and cross compute dot and cross products:
a = vec(1, 2, 3) b = vec(4, 5, 6) dot_prod = dot(a, b) # <a, b> = a · b cross_prod = cross(a, b) # a × b
Visualization
To visualize vectors, VPython provides the arrow object, specified by:
pos– tail position,axis– direction and length of the arrow (a vector).
Optional attributes include shaftwidth, headwidth, headlength, and color (see the VPython arrow documentation).
velocity = vec(1, 1, 0)
origin = vec(0, 0, 0)
shaftwidth = 0.1
vel_arrow = arrow(pos=origin, axis=velocity,
shaftwidth=shaftwidth, color=color.red)
Output in VPython of a visualized vector
A Computational Model
Click here to run the interactive GlowScript computational model.
This model walks through basic vector operations step by step. It starts by defining vectors as arrows, then explores:
- Addition and subtraction
- Scalar multiplication
- Magnitude and unit vectors
- Dot and cross products
Each operation is shown both in formula form and using VPython shortcut functions. You can edit the vector values and rerun the code to see how the results change. Commenting out parts of the script can help you focus on one type of operation at a time.
Exercises and Solutions
Very Simple
Given the vector [math]\displaystyle{ \vec{a} = (2.5, 7.4, 8.0) }[/math], find its norm (magnitude) and a unit vector in its direction.
Solution
First, compute the Euclidean norm:
[math]\displaystyle{ \|\vec{a}\| = \sqrt{2.5^2 + 7.4^2 + 8.0^2} = \sqrt{6.25 + 54.76 + 64} = \sqrt{125.01} \approx 11.18. }[/math]
[math]\displaystyle{ \hat{a} = \frac{1}{\|\vec{a}\|}\vec{a} = \left(\frac{2.5}{\sqrt{125.01}},\; \frac{7.4}{\sqrt{125.01}},\; \frac{8.0}{\sqrt{125.01}}\right) \approx (0.224,\; 0.662,\; 0.716). }[/math]
Then the norm is about [math]\displaystyle{ 11.18 }[/math], and the unit vector in its direction is [math]\displaystyle{ (0.224, 0.662, 0.716) }[/math].
Simple
Let [math]\displaystyle{ \vec{a} = (2, 4, 2) }[/math] and [math]\displaystyle{ \vec{b} = (-1, 1, 3) }[/math]. Find the norm of [math]\displaystyle{ \vec{a} - 2\vec{b} }[/math].
Solution
Compute the combination coordinate-wise:
[math]\displaystyle{ \vec{a} - 2\vec{b} = (2, 4, 2) - 2(-1, 1, 3) = (2, 4, 2) - (-2, 2, 6) = (4, 2, -4). }[/math]
Now find its norm:
[math]\displaystyle{ \|(4, 2, -4)\| = \sqrt{4^2 + 2^2 + (-4)^2} = \sqrt{16 + 4 + 16} = \sqrt{36} = 6. }[/math]
Simple
Find the angle [math]\displaystyle{ \theta \in [0, \pi] }[/math] between [math]\displaystyle{ \vec{a} = (2, 5, -2) }[/math] and [math]\displaystyle{ \vec{b} = (3, -4, -1) }[/math].
Solution
From the inner product angle formula:
[math]\displaystyle{ \langle \vec{a}, \vec{b} \rangle = \|\vec{a}\|\|\vec{b}\|\cos\theta \implies \theta = \arccos\!\left(\frac{\langle \vec{a}, \vec{b} \rangle}{\|\vec{a}\|\|\vec{b}\|}\right). }[/math]
Compute the inner product:
[math]\displaystyle{ \langle \vec{a}, \vec{b} \rangle = 2(3) + 5(-4) + (-2)(-1) = 6 - 20 + 2 = -12. }[/math]
Compute the norms:
[math]\displaystyle{ \|\vec{a}\| = \sqrt{2^2 + 5^2 + (-2)^2} = \sqrt{4 + 25 + 4} = \sqrt{33}, }[/math]
[math]\displaystyle{ \|\vec{b}\| = \sqrt{3^2 + (-4)^2 + (-1)^2} = \sqrt{9 + 16 + 1} = \sqrt{26}. }[/math]
Finally,
[math]\displaystyle{ \theta = \arccos\!\left(\frac{-12}{\sqrt{33}\sqrt{26}}\right) = \arccos\!\left(\frac{-12}{\sqrt{858}}\right) \approx 114.2^\circ. }[/math]
Intermediate
An airplane is flying in still air at [math]\displaystyle{ 240\ \text{m/s} }[/math], [math]\displaystyle{ 35^\circ }[/math] south of west. A wind begins blowing at [math]\displaystyle{ 80\ \text{m/s} }[/math], [math]\displaystyle{ 15^\circ }[/math] east of north. What must the plane’s new velocity relative to the air be in order to keep the same overall trajectory? Give your answer in components with [math]\displaystyle{ +x }[/math] east and [math]\displaystyle{ +y }[/math] north.
Solution
Let:
- [math]\displaystyle{ \vec{v}_{p,0} }[/math] = original velocity of the plane (relative to air),
- [math]\displaystyle{ \vec{v}_w }[/math] = wind velocity (relative to ground),
- [math]\displaystyle{ \vec{v}_{p,1} }[/math] = new velocity of the plane relative to the air.
With the wind blowing, the plane's velocity relative to the ground is [math]\displaystyle{ \vec{v}_{p,1} + \vec{v}_w }[/math]. Requiring this resultant ground velocity to remain equal to [math]\displaystyle{ \vec{v}_{p,0} }[/math] gives:
[math]\displaystyle{ \vec{v}_{p,1} + \vec{v}_w = \vec{v}_{p,0} \implies \vec{v}_{p,1} = \vec{v}_{p,0} - \vec{v}_w. }[/math]
Express everything in components ([math]\displaystyle{ +x }[/math] east, [math]\displaystyle{ +y }[/math] north):
- [math]\displaystyle{ 35^\circ }[/math] south of west corresponds to [math]\displaystyle{ \phi = 180^\circ + 35^\circ = 215^\circ }[/math] from the [math]\displaystyle{ +x }[/math]-axis:
- [math]\displaystyle{ \vec{v}_{p,0} = (240\cos 215^\circ,\; 240\sin 215^\circ)\ \text{m/s} \approx (-196.60,\; -137.66)\ \text{m/s}. }[/math]
- [math]\displaystyle{ 15^\circ }[/math] east of north corresponds to [math]\displaystyle{ \phi = 90^\circ - 15^\circ = 75^\circ }[/math] from the [math]\displaystyle{ +x }[/math]-axis:
- [math]\displaystyle{ \vec{v}_w = (80\cos 75^\circ,\; 80\sin 75^\circ)\ \text{m/s} \approx (20.71,\; 77.27)\ \text{m/s}. }[/math]
Subtract component-wise:
[math]\displaystyle{ \vec{v}_{p,1} = \vec{v}_{p,0} - \vec{v}_w \approx (-196.60,\; -137.66) - (20.71,\; 77.27) \approx (-217.3,\; -214.9)\ \text{m/s}. }[/math]
The plane must adjust its velocity relative to the air to approximately [math]\displaystyle{ (-217.3, -214.9)\ \text{m/s} }[/math] to maintain its original ground velocity.
Intermediate
A mechanic applies a force [math]\displaystyle{ \vec{F} = (30,\; 20,\; -20)\ \text{N} }[/math] to the end of a lever whose position vector relative to the pivot is [math]\displaystyle{ \vec{r} = (0.3,\; -0.4,\; 0.1)\ \text{m} }[/math].
- Compute the torque vector [math]\displaystyle{ \vec{\tau} = \vec{r} \times \vec{F} }[/math] about the pivot.
- Find the magnitude [math]\displaystyle{ \|\vec{\tau}\| }[/math] of the torque.
- Verify using inner products that [math]\displaystyle{ \vec{\tau} }[/math] is orthogonal to both [math]\displaystyle{ \vec{r} }[/math] and [math]\displaystyle{ \vec{F} }[/math], and state what vector you would obtain if you mistakenly computed [math]\displaystyle{ \vec{F} \times \vec{r} }[/math] instead.
Solution
1. Compute [math]\displaystyle{ \vec{\tau} = \vec{r} \times \vec{F} }[/math]:
Using the determinant form (or component formula) with [math]\displaystyle{ \vec{r} = (0.3, -0.4, 0.1)\ \text{m} }[/math] and [math]\displaystyle{ \vec{F} = (30, 20, -20)\ \text{N} }[/math]:
[math]\displaystyle{ \vec{\tau} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 0.3 & -0.4 & 0.1 \\ 30 & 20 & -20 \end{vmatrix}\ \text{N}\cdot\text{m} }[/math]
Expand component by component (keeping track of the minus sign on the [math]\displaystyle{ \hat{j} }[/math] term):
- [math]\displaystyle{ \tau_x = (-0.4)(-20) - (0.1)(20) = 8 - 2 = 6\ \text{N}\cdot\text{m} }[/math]
- [math]\displaystyle{ \tau_y = -\big[(0.3)(-20) - (0.1)(30)\big] = -(-6 - 3) = 9\ \text{N}\cdot\text{m} }[/math]
- [math]\displaystyle{ \tau_z = (0.3)(20) - (-0.4)(30) = 6 - (-12) = 18\ \text{N}\cdot\text{m} }[/math]
Thus,
[math]\displaystyle{ \vec{\tau} = (6,\; 9,\; 18)\ \text{N}\cdot\text{m}. }[/math]
(Note: Although [math]\displaystyle{ \text{N}\cdot\text{m} }[/math] has the same SI base units as the joule, torque is conventionally written in [math]\displaystyle{ \text{N}\cdot\text{m} }[/math] to distinguish it from energy or work.)
2. Find the magnitude [math]\displaystyle{ \|\vec{\tau}\| }[/math]:
[math]\displaystyle{ \|\vec{\tau}\| = \sqrt{6^2 + 9^2 + 18^2}\ \text{N}\cdot\text{m} = \sqrt{36 + 81 + 324}\ \text{N}\cdot\text{m} = \sqrt{441}\ \text{N}\cdot\text{m} = 21\ \text{N}\cdot\text{m}. }[/math]
3. Verify orthogonality and anticommutativity:
Compute the inner product of [math]\displaystyle{ \vec{\tau} }[/math] with [math]\displaystyle{ \vec{r} }[/math] and with [math]\displaystyle{ \vec{F} }[/math]:
[math]\displaystyle{ \langle \vec{\tau}, \vec{r} \rangle = 6(0.3) + 9(-0.4) + 18(0.1) = 1.8 - 3.6 + 1.8 = 0, }[/math]
[math]\displaystyle{ \langle \vec{\tau}, \vec{F} \rangle = 6(30) + 9(20) + 18(-20) = 180 + 180 - 360 = 0. }[/math]
Since both inner products vanish, [math]\displaystyle{ \vec{\tau} }[/math] is orthogonal to both [math]\displaystyle{ \vec{r} }[/math] and [math]\displaystyle{ \vec{F} }[/math].
Finally, because the cross product is anticommutative ([math]\displaystyle{ \vec{F} \times \vec{r} = -(\vec{r} \times \vec{F}) }[/math]), reversing the order flips every sign:
[math]\displaystyle{ \vec{F} \times \vec{r} = -\vec{\tau} = (-6,\; -9,\; -18)\ \text{N}\cdot\text{m}. }[/math]
Challenging
Suppose [math]\displaystyle{ \vec{u} }[/math] and [math]\displaystyle{ \vec{v} }[/math] are two vectors in [math]\displaystyle{ \mathbf{R}^3 }[/math] (or more generally [math]\displaystyle{ \mathbf{R}^n }[/math]) such that
[math]\displaystyle{ \|\vec{u}\| = 3, \qquad \|\vec{u} + \vec{v}\| = 4, \qquad \|\vec{u} - \vec{v}\| = 6. }[/math]
Without knowing any components of [math]\displaystyle{ \vec{u} }[/math] or [math]\displaystyle{ \vec{v} }[/math], find the norm [math]\displaystyle{ \|\vec{v}\| }[/math] and the angle [math]\displaystyle{ \theta }[/math] between [math]\displaystyle{ \vec{u} }[/math] and [math]\displaystyle{ \vec{v} }[/math].
Solution
Recall that the square of a vector's norm equals the inner product of the vector with itself: [math]\displaystyle{ \|x\|^2 = \langle x, x \rangle }[/math]. Expanding the squared norms of the sum and difference using the linearity and symmetry of the real inner product gives:
[math]\displaystyle{ \|\vec{u} + \vec{v}\|^2 = \langle \vec{u} + \vec{v},\; \vec{u} + \vec{v} \rangle = \|\vec{u}\|^2 + 2\langle \vec{u}, \vec{v} \rangle + \|\vec{v}\|^2 }[/math]
[math]\displaystyle{ \|\vec{u} - \vec{v}\|^2 = \langle \vec{u} - \vec{v},\; \vec{u} - \vec{v} \rangle = \|\vec{u}\|^2 - 2\langle \vec{u}, \vec{v} \rangle + \|\vec{v}\|^2 }[/math]
1. Find [math]\displaystyle{ \|\vec{v}\| }[/math] (Parallelogram Equality):
Adding the two equations cancels the [math]\displaystyle{ 2\langle \vec{u}, \vec{v} \rangle }[/math] cross-term:
[math]\displaystyle{ \|\vec{u} + \vec{v}\|^2 + \|\vec{u} - \vec{v}\|^2 = 2\left(\|\vec{u}\|^2 + \|\vec{v}\|^2\right) }[/math]
Substitute the given norms ([math]\displaystyle{ \|\vec{u}\| = 3 }[/math], [math]\displaystyle{ \|\vec{u} + \vec{v}\| = 4 }[/math], [math]\displaystyle{ \|\vec{u} - \vec{v}\| = 6 }[/math]):
[math]\displaystyle{ 4^2 + 6^2 = 2\left(3^2 + \|\vec{v}\|^2\right) }[/math]
[math]\displaystyle{ 16 + 36 = 2\left(9 + \|\vec{v}\|^2\right) }[/math]
[math]\displaystyle{ 52 = 18 + 2\|\vec{v}\|^2 \implies 2\|\vec{v}\|^2 = 34 \implies \|\vec{v}\|^2 = 17 }[/math]
Since a norm is always nonnegative:
[math]\displaystyle{ \|\vec{v}\| = \sqrt{17} \approx 4.12. }[/math]
2. Find the angle [math]\displaystyle{ \theta }[/math] between [math]\displaystyle{ \vec{u} }[/math] and [math]\displaystyle{ \vec{v} }[/math]:
Subtracting the second expansion from the first isolates the inner product:
[math]\displaystyle{ \|\vec{u} + \vec{v}\|^2 - \|\vec{u} - \vec{v}\|^2 = 4\langle \vec{u}, \vec{v} \rangle }[/math]
[math]\displaystyle{ 16 - 36 = 4\langle \vec{u}, \vec{v} \rangle \implies \langle \vec{u}, \vec{v} \rangle = -5 }[/math]
Applying the inner product angle formula:
[math]\displaystyle{ \cos\theta = \frac{\langle \vec{u}, \vec{v} \rangle}{\|\vec{u}\|\|\vec{v}\|} = \frac{-5}{3\sqrt{17}} \approx -0.4042 }[/math]
[math]\displaystyle{ \theta = \arccos\!\left(\frac{-5}{3\sqrt{17}}\right) \approx 113.8^\circ. }[/math]
Geometric & physics note: Think of [math]\displaystyle{ \vec{u} }[/math] and [math]\displaystyle{ \vec{v} }[/math] as two adjacent sides of a parallelogram (for example, two forces acting on a particle); then [math]\displaystyle{ \vec{u} + \vec{v} }[/math] and [math]\displaystyle{ \vec{u} - \vec{v} }[/math] are its two diagonals. The identity [math]\displaystyle{ \|\vec{u} + \vec{v}\|^2 + \|\vec{u} - \vec{v}\|^2 = 2(\|\vec{u}\|^2 + \|\vec{v}\|^2) }[/math] is the parallelogram equality, which allows us to recover unknown norms and angles purely from length measurements—without ever choosing a coordinate system.
Applications and History
Applications Across Disciplines
Vectors appear in many everyday and engineering contexts.
Consider a desk. Its weight is a force vector pointing downward, the normal force from the floor is a vector pointing upward, and the forces among the desk’s parts can all be represented as vectors. Measurements such as the diagonal distance across the desktop can also be seen as vectors from one corner to another.
Your motion can be described using vectors as well. Your position relative to some reference point can be written as a position vector. The difference between two position vectors is a displacement vector. Velocity describes how your position changes over time; it is the time derivative of the position vector, and its magnitude is your speed. Acceleration is the time derivative of velocity. All of these quantities can be broken into components, which makes it easier to analyze motion in each direction separately.
Vectors and units appear across everyday physical situations and virtually every STEM field:
- Electromagnetism and Fields: Electric fields [math]\displaystyle{ \vec{E} }[/math] and magnetic fields [math]\displaystyle{ \vec{B} }[/math] are vector fields that assign a vector to every point in space, interacting with charges through operations like the Lorentz force [math]\displaystyle{ \vec{F} = q(\vec{E} + \vec{v} \times \vec{B}) }[/math].
- Engineering: Structural stress analysis, fluid dynamics, robotics kinematics, control theory, and phasor analysis in AC electrical circuits all depend on vector spaces and inner products.
- Computer Science and Graphics: 2D/3D rendering engines use vectors for positions, surface normals, lighting (via dot products), and coordinate transformations, while machine learning models represent data points as vectors in high-dimensional spaces [math]\displaystyle{ \mathbf{R}^n }[/math].
- Navigation: GPS receivers, aircraft, and ships continuously combine position, velocity, wind, and current vectors to compute headings and trajectories.
History
Ideas similar to vectors go back many centuries. Early uses treated them as directed line segments rather than abstract quantities. Hero of Alexandria’s work Mechanics in the first century AD contains one of the earliest known discussions of adding such directed segments.
In the 18th and 19th centuries, several mathematicians used 2D vectors to represent complex numbers. Caspar Wessel, Jean-Robert Argand, Carl Friedrich Gauss, and William Rowan Hamilton all contributed to this viewpoint. One component represented the real part, and the other represented the imaginary part. Hamilton also introduced the term “vector.”
August Ferdinand Möbius, in his 1827 book The Barycentric Calculus, formalized many vector ideas, including labeling vectors with letters and defining scalar multiplication. Hermann Grassmann, in his 1844 work Ausdehnungslehre (“The Calculus of Extension”), developed a more general theory of vectors in spaces of arbitrary dimension and laid foundations for linear algebra.
The modern vector notation and conventions used in physics owe a lot to J. Willard Gibbs and Oliver Heaviside in the late 19th century. They refined vector methods and used them to express Maxwell’s equations of electromagnetism in the compact form we study today.
See Also
External Links
- MIT OpenCourseWare 18.02SC: Vectors and Matrices Notes
- VPython / GlowScript Vector Documentation
- University of Guelph: Introductory Vector Tutorial
Further Reading
- Linear Algebra Done Right – Sheldon Axler (2024)
- Vector Analysis – Josiah Willard Gibbs & Edwin Bidwell Wilson (1901)
- Introduction to Matrices and Vectors – Jacob T. Schwartz (1961)
References
- Axler, Sheldon. Linear Algebra Done Right (4th ed., Springer, 2024).
- Math Insight: An Introduction to Vectors
- Math Insight: Magnitude of a Vector
- Math is Fun: Vectors
- MIT OCW 18.02SC Multivariable Calculus: Session 1 Notes
- McGill University: Brief History of Vectors
- GlowScript / VPython Documentation: Vectors
- GlowScript / VPython Documentation: Arrow
- Encyclopædia Britannica: Vector (Mathematics)
- NASA Glenn Research Center: Vector Components
- Online Math Learning: Dot Product







