Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How do you find the dot product of two vectors?

Multiply matching vector components and add the products to calculate a dot product. Learn what the scalar result says about direction and length.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To calculate a dot product, multiply each component of one vector by the component in the same position in the other vector, then add those products. For example, (1, 2, 3) · (4, −1, 2) = 1×4 + 2×(−1) + 3×2 = 8. The result is a single number, called a scalar—not another vector.

How to calculate a dot product from coordinates

For two real vectors with the same number of components, the coordinate formula is:

As an Amazon Associate I earn from qualifying purchases.

u · v = u₁v₁ + u₂v₂ + … + uₙvₙ

Each component is multiplied by the component in the matching position. Add every product, including negative ones. The University of Nebraska–Lincoln demonstrates the method with (−2, 0, 1) · (3, 2, −4) = (−2)(3) + (0)(2) + (1)(−4) = −10 in its dot product lesson.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Work through a two-dimensional example

Calculate (2, −1) · (3, 4) by pairing entries in order:

  1. Multiply the first pair: 2 × 3 = 6.
  2. Multiply the second pair: (−1) × 4 = −4.
  3. Add the products: 6 + (−4) = 2.

So (2, −1) · (3, 4) = 2. Adding the original components first, or stopping at the list of pairwise products, does not complete the dot product: the definition requires adding the products.

Check the vector dimensions

The coordinate formula pairs entries by position, so both vectors must have the same number of components and belong to the same coordinate space, such as ℝ² or ℝ³. If one vector has two entries and the other has three, this standard coordinate dot product is not defined.

Why the answer is a number

The operation ends by summing the component products, and that sum is one scalar. It does not return the component-wise products as a new vector. For example, the intermediate products for (2, −1) · (3, 4) are 6 and −4; their sum, 2, is the dot product.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the dot product says about direction

The geometric formula for two vectors is u · v = |u||v| cos θ, where |u| and |v| are their lengths and θ is the angle between them. It gives the same scalar as the coordinate calculation. Use the coordinate formula when the components are given; the magnitude-angle formula is useful when the lengths and angle are known or when interpreting how the vectors point relative to each other. MIT’s Vector Calculus: Dot Product explains the geometric relationship.

Positive, zero, and negative results

When both vectors are nonzero, the sign reflects the angle between them:

  • Positive: the angle is acute, so the vectors point generally in the same direction.
  • Zero: the angle is 90°, so the vectors are perpendicular, or orthogonal.
  • Negative: the angle is obtuse, so the vectors point generally in opposing directions.

The zero-vector exception matters: a zero vector has dot product zero with every vector, but it has no direction and does not form a usual angle with another vector. Therefore, a zero result establishes perpendicularity only when both vectors are nonzero. See the University of Nebraska–Lincoln’s discussion of orthogonality.

Rank #4
Sale
Linear Algebra 5th Edition
  • Brand: Pearson Education
  • Linear Algebra 5th Edition

Finding the angle from a dot product

If both vectors are nonzero, rearrange the geometric formula to find the angle:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

θ = arccos((u · v) / (|u||v|))

Use a calculator’s degree mode if you want the answer in degrees, or radian mode if you want radians. The dot product itself is not an angle; the inverse cosine gives the angle after the dot product is divided by the product of the vector lengths.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How the dot product relates to length

Taking the dot product of a vector with itself gives its squared length: u · u = ||u||². Therefore, ||u|| = √(u · u). A self-dot-product can never be negative; it is zero only when the vector is the zero vector. This is a useful check when working through a calculation. The University of Nebraska–Lincoln also describes the dot product’s symmetry and linearity properties in its lesson: u · v = v · u, sums distribute, and scalar factors can be pulled out.

What a dot product is useful for

The magnitude-angle form measures directional alignment scaled by the vectors’ lengths. A related projection interpretation is especially clear for a unit vector u: a · u = ||a|| cos θ gives the signed component of a in the direction of u. The University of Minnesota’s Math Insight explanation develops this interpretation.

In physics, the dot product connects force and displacement to work: the component of force in the direction of motion contributes to the work. Lamar University’s Calculus II dot product notes describe this application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The dot product also does not depend on which coordinate axes are used to describe the vectors. MIT OpenCourseWare notes that “the dot product is invariant under rotation of coordinates” in its section on the dot product.

Quick Recap

SaleBestseller No. 4
Linear Algebra 5th Edition
Linear Algebra 5th Edition
Brand: Pearson Education; Linear Algebra 5th Edition
$27.26

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.