Precalculus and linear algebra

Vector Formulas

Use components to keep vector quantities and scalar results straight. Start with length and direction, then choose the dot product, cross product or projection by what you need to find.

On this page

Find a formula

Open a formula for its definition and a worked example.

Describe a displacement by components

  • Coordinates or a sum of basis vectors2D: ⟨v₁, v₂⟩; 3D: ⟨v₁, v₂, v₃⟩ = v₁e₁ + v₂e₂ + v₃e₃The e vectors are the coordinate unit vectors.

    What it does

    A coordinate tuple lists a vector’s signed components. In basis form, those components multiply the corresponding coordinate unit vectors.

    Worked example

    Write v = ⟨−2, 5, 3⟩ in basis form. Then give its projection onto the xy-plane as a 2D tuple.

    1. Multiply e₁, e₂, and e₃ by the corresponding components to get −2e₁ + 5e₂ + 3e₃.
    2. Dropping the perpendicular z-component gives the planar tuple ⟨−2, 5⟩.
    Link to this example
  • End point minus start pointAB = ⟨xB − xA, yB − yA, zB − zA⟩

    What it does

    The vector from a starting point to an endpoint is the change in each coordinate, in endpoint-minus-start order.

    Worked example

    Find the displacement from A = (1, −3, 4) to B = (5, 2, 1).

    1. Subtract corresponding coordinates: (5 − 1, 2 − (−3), 1 − 4).
    2. The displacement is ⟨4, 5, −3⟩.
    Link to this example
  • Displacement with all components zero2D: ⟨0, 0⟩; 3D: ⟨0, 0, 0⟩

    What it does

    The zero vector has every component equal to zero and leaves any vector unchanged under addition.

    Worked example

    Find the net displacement for a move of ⟨3, −2⟩ followed by ⟨−3, 2⟩.

    1. Add the two horizontal changes to get 0 and the two vertical changes to get 0.
    2. The result is the zero vector ⟨0, 0⟩.
    Link to this example

Find length and direction

  • Euclidean norm2D: ‖v‖ = √(v₁² + v₂²); 3D: ‖v‖ = √(v₁² + v₂² + v₃²)

    What it does

    The Euclidean norm is the square root of the sum of squared components. It gives the length of the displacement.

    Worked example

    Find the norms of ⟨3, −4⟩ and ⟨2, −3, 6⟩.

    1. In two dimensions, √(9 + 16) = 5.
    2. In three dimensions, √(4 + 9 + 36) = 7.
    Link to this example
  • Normalize to a unit vectorv/‖v‖The vector must be nonzero.

    What it does

    Normalizing a nonzero vector divides each component by its length, leaving direction unchanged and giving length one.

    Worked example

    Find a unit vector in the direction of ⟨5, 12⟩.

    1. The norm is √(25 + 144) = 13.
    2. Divide by 13 to obtain ⟨5/13, 12/13⟩.
    Link to this example
  • Connect an angle to planar componentsθ = atan2(v₂, v₁); v = ‖v‖⟨cos θ, sin θ⟩Use atan2 for the angle from the positive x-axis of a nonzero vector. A simple arctangent of the quotient can give the wrong quadrant.

    What it does

    Use both component signs to find the direction measured from the positive x-axis. Multiplying the unit-circle coordinates by the magnitude reconstructs the vector.

    Worked example

    Find the magnitude and angle of ⟨−3, 3√3⟩.

    1. Its magnitude is √(9 + 27) = 6. Its reference angle is 60° and the signs place it in quadrant II.
    2. The direction is 120°, and 6⟨cos 120°, sin 120°⟩ = ⟨−3, 3√3⟩.
    Link to this example

Combine and scale vectors

  • Add or subtract matching coordinates(u ± v)ᵢ = uᵢ ± vᵢUse vectors in the same dimension.

    What it does

    Vector addition and subtraction combine corresponding signed components. Both vectors must have the same dimension.

    Worked example

    Given u = ⟨2, −4⟩ and v = ⟨−1, 3⟩, compute u + v and u − v.

    1. For addition, compute ⟨2 + (−1), −4 + 3⟩ = ⟨1, −1⟩.
    2. For subtraction, compute ⟨2 − (−1), −4 − 3⟩ = ⟨3, −7⟩.
    Link to this example
  • Multiply all coordinates by a scalar(cv)ᵢ = cvᵢ; ‖cv‖ = |c|‖v‖

    What it does

    A scalar multiplies every component. Length scales by the scalar’s absolute value, and a negative scalar reverses direction.

    Worked example

    Find −3v and its norm for v = ⟨4, −3⟩.

    1. Multiplying componentwise gives ⟨−12, 9⟩.
    2. The original norm is 5, so the new norm is 3(5) = 15.
    Link to this example

Use the dot product to compare directions

  • Add coordinate productsu · v = ∑uᵢvᵢ; v · v = ‖v‖²

    What it does

    The dot product is the sum of the products of matching components. A vector dotted with itself yields its squared norm.

    Worked example

    Compute u · v and v · v for u = ⟨2, 0, −1⟩ and v = ⟨3, 4, 2⟩.

    1. The mixed dot product is 2(3) + 0(4) + (−1)(2) = 4.
    2. The self dot product is 3² + 4² + 2² = 29, so ‖v‖ = √29.
    Link to this example
  • Relate the dot product to the angleu · v = ‖u‖‖v‖ cos θ; cos θ = (u · v)/(‖u‖‖v‖)For nonzero vectors, a zero dot product means the angle is 90°.

    What it does

    Dividing the dot product by the product of two nonzero lengths yields the cosine of the angle between the vectors.

    Worked example

    Find the angle between u = ⟨1, 0⟩ and v = ⟨1, √3⟩. Compare u with w = ⟨0, 2⟩.

    1. The dot product u · v is 1 and the lengths are 1 and 2. The cosine is 1/2, so the angle is 60°.
    2. The dot product u · w is zero, giving a 90° angle.
    Link to this example
See Inequality Rules Cheat Sheet

Use the cross product in three dimensions

  • Expand by componentsu × v = ⟨u₂v₃ − u₃v₂, u₃v₁ − u₁v₃, u₁v₂ − u₂v₁⟩These are the signed minors of the determinant mnemonic with the basis vectors in its first row, followed by u and v.

    What it does

    The cross product in three dimensions uses the three signed minors from the component rows. It produces a vector perpendicular to both inputs.

    Worked example

    Find ⟨1, 2, 0⟩ × ⟨3, 0, 4⟩.

    1. Compute components 2(4) − 0(0), 0(3) − 1(4), and 1(0) − 2(3).
    2. The result is ⟨8, −4, −6⟩.
    Link to this example
  • Length and orientation‖u × v‖ = ‖u‖‖v‖ sin θ; u × v = −(v × u)Use the angle between nonzero vectors. A zero factor gives a zero cross product.

    What it does

    A cross product has length equal to the product of the input lengths times the sine of their angle. Swapping the inputs reverses orientation.

    Worked example

    Take u = ⟨3, 0, 0⟩ and v = ⟨0, 2, 0⟩. Find both ordered cross products.

    1. The angle is 90°, so the length is 3 · 2 = 6. The right-hand rule points u × v along positive z.
    2. Thus u × v = ⟨0, 0, 6⟩ and v × u = ⟨0, 0, −6⟩.
    Link to this example
  • Areas and volume from spanning vectorsParallelogram: ‖u × v‖; triangle: ‖u × v‖/2; parallelepiped: |u · (v × w)|

    What it does

    The magnitude of a cross product gives parallelogram base area. The corresponding triangle has half the area, and the absolute scalar triple product gives the volume.

    Worked example

    With u = ⟨2, 0, 0⟩, v = ⟨0, 3, 0⟩, and w = ⟨1, 1, 4⟩, find the two base areas and the spanned volume.

    1. u × v = ⟨0, 0, 6⟩, so the parallelogram and triangle have areas 6 and 3.
    2. The volume is |(u × v) · w| = |6(4)| = 24.
    Link to this example

Split a vector along a direction

  • Signed length, projection and remainderScalar: (u · v)/‖v‖; projection: ((u · v)/‖v‖²)v; orthogonal part: u − projectionThe direction vector v must be nonzero.

    What it does

    The scalar projection is signed distance along a nonzero direction. Multiplying by its unit vector gives the parallel component, leaving a perpendicular remainder.

    Worked example

    Project u = ⟨4, 2⟩ onto v = ⟨1, 1⟩ and find the perpendicular part.

    1. The dot product is 6 and ‖v‖² = 2. The scalar projection is 6/√2 = 3√2 and the vector projection is 3v = ⟨3, 3⟩.
    2. Subtract to get ⟨1, −1⟩, whose dot product with v is zero.
    Link to this example

Describe lines and planes in space

  • Line through a point with direction vr(t) = r₀ + tv; (x, y, z) = (x₀ + at, y₀ + bt, z₀ + ct)Use the nonzero direction vector v = ⟨a, b, c⟩.

    What it does

    A spatial line starts at one point and adds a real multiple of a nonzero direction vector. Expanding components gives the coordinate equations.

    Worked example

    Give parametric equations through (1, 4, −2) with direction ⟨3, 0, −1⟩.

    1. Start with r(t) = ⟨1, 4, −2⟩ + t⟨3, 0, −1⟩.
    2. The equations are x = 1 + 3t, y = 4, and z = −2 − t.
    Link to this example
  • Plane perpendicular to a normal nn · (r − r₀) = 0; a(x − x₀) + b(y − y₀) + c(z − z₀) = 0The nonzero normal is n = ⟨a, b, c⟩ and r₀ is on the plane.

    What it does

    Every displacement from a point in a plane to another point in that plane is perpendicular to the normal vector. This makes the dot product zero.

    Worked example

    Write the plane through (2, 1, 0) with normal ⟨1, 2, −3⟩.

    1. Set ⟨1, 2, −3⟩ · ⟨x − 2, y − 1, z⟩ = 0.
    2. Expand to obtain x + 2y − 3z = 4.
    Link to this example
  • Distance from a point to a planeD = |ax₁ + by₁ + cz₁ + d|/√(a² + b² + c²)The plane is ax + by + cz + d = 0 and the point is (x₁, y₁, z₁).

    What it does

    The shortest distance to a plane is the absolute length of the displacement projected onto the plane’s normal.

    Worked example

    Find the distance from (1, 2, 3) to the plane 2x − 2y + z − 6 = 0.

    1. Substitute the point to get 2 − 4 + 3 − 6 = −5. The normal length is √(4 + 4 + 1) = 3.
    2. The distance is |−5|/3 = 5/3.
    Link to this example
See Matrix Formulas

Differentiate a moving position vector

  • Velocity and accelerationv(t) = r′(t) = ⟨x′(t), y′(t), z′(t)⟩; a(t) = r″(t)

    What it does

    Velocity differentiates each position component with respect to time. Acceleration differentiates each velocity component once more.

    Worked example

    For r(t) = ⟨t², 3t, t³⟩, find velocity and acceleration at t = 2.

    1. Differentiate to get v(t) = ⟨2t, 3, 3t²⟩ and a(t) = ⟨2, 0, 6t⟩.
    2. At t = 2 the vectors are ⟨4, 3, 12⟩ and ⟨2, 0, 12⟩.
    Link to this example
  • Speed and distance traveledSpeed = ‖r′(t)‖ = √(x′(t)² + y′(t)² + z′(t)²); length = ∫ab ‖r′(t)‖ dt

    What it does

    Speed is the magnitude of velocity. Its time integral gives total distance traveled along the curve.

    Worked example

    Find the distance traveled by r(t) = ⟨3t, 4t, 0⟩ from t = 0 to t = 6.

    1. The velocity is ⟨3, 4, 0⟩ and its magnitude is the constant 5.
    2. Integrating 5 over six time units gives distance 30.
    Link to this example
  • Unit tangent along the direction of motionT(t) = r′(t)/‖r′(t)‖Use at times with positive speed.

    What it does

    The unit tangent is velocity normalized to length one. It gives the instantaneous direction when speed is positive.

    Worked example

    Find the unit tangent to r(t) = ⟨t², 2t⟩ at t = 1.

    1. The derivative at 1 is ⟨2, 2⟩ and its norm is 2√2.
    2. Normalize to get ⟨1/√2, 1/√2⟩.
    Link to this example
See Derivatives cheat sheet

Preview the printable

Download the compact sheet for a quick review, or print the complete formula list from this page.

Practice these skills

Related references

Sources and review

Math Sheet prepares original print materials. See how we check formulas and printouts.

Browse all formula sheets →