Updated on April 21st, 2026

Dot Product Calculator

Created By Jehan Wadia

Input
Results

Dot Product

32

Angle Between Vectors

12.9332°

Vectors Are

Not Orthogonal

Parsed Vectors
Step-by-Step Solution
Vector Properties
Property Vector A Vector B
Component Visualization
Formula Reference

Dot Product (Algebraic Definition):

A · B = Σ (aᵢ × bᵢ) = a₁b₁ + a₂b₂ + ... + aₙbₙ

Angle Between Two Vectors:

θ = arccos( (A · B) / (‖A‖ × ‖B‖) )

Magnitude (Euclidean Norm):

‖A‖ = √(a₁² + a₂² + ... + aₙ²)

Orthogonality:

Two vectors are orthogonal if and only if A · B = 0

Scalar Projection of A onto B:

proj = (A · B) / ‖B‖


Introduction

The dot product is a way to multiply two vectors together and get a single number as the result. You take each pair of matching numbers from the two vectors, multiply them, and then add all those products together. For example, if you have vector A = (2, 3) and vector B = (4, 5), the dot product is (2 × 4) + (3 × 5) = 23. This simple operation is one of the most important tools in linear algebra and shows up everywhere in math, physics, and computer science.

The dot product tells you something useful about how two vectors relate to each other. When the dot product is zero, the two vectors are perpendicular, meaning they form a right angle. A positive result means the vectors point in a similar direction, while a negative result means they point in opposite directions. This makes the dot product helpful for finding angles between vectors, projecting one vector onto another, and solving many real-world problems.

Use this dot product calculator to quickly find the dot product of two vectors of any size. Just enter the values for each vector, and the calculator will do the math for you in seconds. Whether you are working on a homework problem or checking your work on a bigger project, this tool saves you time and helps you avoid mistakes.

How to Use Our Dot Product Calculator

Enter two or more vectors with the same number of dimensions, and this calculator will compute the dot product, the angle between vectors, and whether they are orthogonal. It also shows a full step-by-step solution, vector magnitudes, scalar projections, and a component chart.

Input Mode: Choose between "Freeform Input" or "Structured Input." Freeform lets you type vectors directly into a text box using parentheses, brackets, or angle brackets. Structured mode gives you individual number fields for each component of each vector.

Freeform Input: Type your vectors into the text area using a format like (1, 2, 3) · (4, 5, 6). You can also enter one vector per line, separated by commas. All vectors must have the same number of components. Use the optional on-screen keypad to insert numbers, brackets, and special symbols if needed.

Structured Input — Dimensions: Set the number of dimensions for your vectors. This controls how many component fields appear for each vector. The minimum is 2 and the maximum is 100.

Structured Input — Vectors: Set how many vectors you want to compare. The minimum is 2 and the maximum is 20. After choosing your dimensions and vector count, click "Build Fields" to generate the input boxes, then type a number into each component field.

Examples: Click the "Examples" button in freeform mode to see pre-built vector pairs you can load with one click. These include 2D, 3D, 5D, orthogonal, and multi-vector examples.

Calculate Dot Product: Press the "Calculate Dot Product" button to run the calculation. The results section will display the dot product value, the angle between the first two vectors in degrees, and whether the vectors are orthogonal (perpendicular). You will also see a step-by-step breakdown showing the formula, substituted values, individual products, and the final sum.

Reset: Click the "Reset" button to clear your inputs and return the calculator to its default example of (1, 2, 3) · (4, 5, 6).

What Is the Dot Product?

The dot product (also called the scalar product) is a way to multiply two vectors together and get a single number as the result. If you have two vectors with the same number of components, you multiply each matching pair of components and then add all those products together. For example, if Vector A is (1, 2, 3) and Vector B is (4, 5, 6), the dot product is (1×4) + (2×5) + (3×6) = 4 + 10 + 18 = 32.

The Dot Product Formula

The algebraic formula for the dot product of two vectors A and B, each with n components, is:

A · B = a₁b₁ + a₂b₂ + ... + aₙbₙ

This works for vectors in 2D, 3D, or any number of dimensions. The only rule is that both vectors must have the same number of components. You cannot take the dot product of a 2D vector and a 3D vector.

What Does the Dot Product Tell You?

The dot product gives you useful information about the relationship between two vectors:

  • Positive result: The two vectors generally point in the same direction (the angle between them is less than 90°).
  • Zero result: The two vectors are orthogonal, meaning they are perpendicular to each other (the angle between them is exactly 90°).
  • Negative result: The two vectors generally point in opposite directions (the angle between them is greater than 90°).

Finding the Angle Between Two Vectors

There is a second, geometric definition of the dot product that connects it to the angle between two vectors:

A · B = ‖A‖ × ‖B‖ × cos(θ)

Here, ‖A‖ and ‖B‖ are the magnitudes (lengths) of the vectors, and θ is the angle between them. By rearranging this formula, you can solve for the angle:

θ = arccos( (A · B) / (‖A‖ × ‖B‖) )

The magnitude of a vector is found using the formula ‖A‖ = √(a₁² + a₂² + ... + aₙ²). This is simply an extension of the Pythagorean theorem to any number of dimensions. If you need to find the straight-line distance between two points in space, our Distance Calculator applies this same concept.

Scalar Projection

The dot product also lets you calculate the scalar projection of one vector onto another. The scalar projection of A onto B tells you how much of Vector A points in the direction of Vector B. The formula is:

Scalar projection of A onto B = (A · B) / ‖B‖

If this value is positive, A has a component in the same direction as B. If it is negative, A has a component in the opposite direction of B.

Key Properties of the Dot Product

  • Commutative: A · B = B · A. The order does not matter.
  • Distributive: A · (B + C) = A · B + A · C.
  • Scalar multiplication: (kA) · B = k(A · B), where k is any number.
  • Self dot product: A · A = ‖A‖², which equals the square of the vector's magnitude.

Dot Product and Related Mathematical Concepts

The dot product is closely connected to many other areas of mathematics. Understanding the angle between vectors ties directly into trigonometry — the geometric formula relies on the cosine function and the Law of Cosines, which generalizes the Pythagorean theorem. If you are working with triangles and need to find angles or sides, the Law of Sines Calculator and Right Triangle Calculator are also useful companions.

When computing the dot product by hand, you are performing basic arithmetic with multiplication and addition. For problems involving exponents within vector components, our Exponent Calculator can help, and if you need to simplify expressions or track significant figures in your results, try the Sig Fig Calculator.

In statistics and data science, the dot product is the foundation of the Correlation Coefficient Calculator, since the Pearson correlation is essentially a normalized dot product. If your vectors represent data sets, you might also want to compute the mean, median, and mode or the standard deviation of their components.

The dot product also connects to the Slope Calculator and the Midpoint Calculator when working with vectors in coordinate geometry, since slopes and midpoints describe the same geometric relationships between points that vectors formalize.

Where Is the Dot Product Used?

The dot product shows up in many areas of math and science. In physics, it is used to calculate work, which equals the dot product of the force vector and the displacement vector. You can explore related physics concepts with our Force Calculator, Displacement Calculator, and Kinetic Energy Calculator, all of which involve quantities that rely on the dot product in their derivations. The Torque Calculator and Momentum Calculator also deal with vector quantities where understanding projections and angles between vectors is essential.

In computer graphics, the dot product helps determine lighting and shading by measuring the angle between a surface and a light source. In machine learning, dot products are at the heart of how neural networks process data. Any time you need to measure how much two vectors align with each other, the dot product is the tool to use.

For problems that involve rates and proportional relationships alongside vector work, tools like the Rate of Change Calculator, Ratio Calculator, and Percentage Calculator can complement your calculations. And if your work extends into calculus — where the dot product is used in gradient computations and directional derivatives — our Derivative Calculator can assist with those more advanced problems.


Frequently Asked Questions

What is a dot product in simple terms?

A dot product is a way to multiply two vectors and get a single number. You multiply each matching pair of numbers from the two vectors, then add all the results together. For example, (2, 3) · (4, 1) = (2×4) + (3×1) = 8 + 3 = 11.

Can I calculate the dot product of vectors with different sizes?

No. Both vectors must have the same number of components. You cannot find the dot product of a 2D vector and a 3D vector. If the dimensions do not match, the calculator will show an error message asking you to fix your input.

What does it mean when the dot product is zero?

When the dot product equals zero, the two vectors are orthogonal, which means they are perpendicular to each other. They form a 90° angle. This is one of the most common ways to check if two vectors are perpendicular.

Can this calculator handle more than two vectors?

Yes. You can enter three or more vectors, and the calculator will show the dot product of the first two as the main result. It will also compute and display all pairwise dot products for every combination of vectors you entered.

What is the highest number of dimensions this calculator supports?

In structured input mode, you can enter vectors with up to 100 dimensions. In freeform mode, there is no hard limit — just type your vector components separated by commas inside parentheses or brackets.

How is the angle between two vectors calculated?

The calculator uses the formula θ = arccos((A · B) / (‖A‖ × ‖B‖)). It divides the dot product by the product of both vector magnitudes, then takes the inverse cosine of that value. The result is shown in degrees.

What is vector magnitude?

Vector magnitude is the length of a vector. It is found using the formula ‖A‖ = √(a₁² + a₂² + ... + aₙ²). You square each component, add them all up, and take the square root. The calculator shows the magnitude for each vector in the properties table.

What is a scalar projection?

A scalar projection tells you how much of one vector points in the direction of another vector. The formula is (A · B) / ‖B‖. A positive value means the vectors share a direction. A negative value means they point away from each other.

What formats can I use to enter vectors in freeform mode?

You can use parentheses like (1, 2, 3), square brackets like [1, 2, 3], angle brackets like <1, 2, 3>, or curly braces like {1, 2, 3}. You can also type one vector per line with just commas, like 1, 2, 3 on one line and 4, 5, 6 on the next.

Can I use negative numbers or decimals in my vectors?

Yes. The calculator accepts negative numbers and decimals. For example, you can enter (-3.5, 2, 0.7) · (1, -4, 2.1) and the calculator will handle it correctly.

What is the difference between a dot product and a cross product?

The dot product gives you a single number (a scalar) and works in any number of dimensions. The cross product gives you a new vector and only works in 3D. The dot product measures how much two vectors align, while the cross product finds a vector perpendicular to both.

What does the component visualization chart show?

The bar chart shows each component of your vectors side by side. Each group on the x-axis represents a dimension (x₁, x₂, x₃, etc.), and the bars show the value of each vector's component in that dimension. This makes it easy to visually compare the vectors.

What is a unit vector and why does the calculator show it?

A unit vector is a vector with a magnitude of exactly 1. It points in the same direction as the original vector but has been scaled down. The calculator divides each component by the vector's magnitude to find it. Unit vectors are useful for showing direction without size.

Why does the angle show as N/A?

The angle shows as N/A when one or both of your vectors is a zero vector (all components are 0). A zero vector has no direction, so there is no angle to compute. Make sure your vectors have at least one non-zero component.

Is the dot product the same as regular multiplication?

No. Regular multiplication works on single numbers. The dot product works on vectors, which are lists of numbers. It multiplies matching pairs of components and adds the results. The final answer is always a single number, not a vector.


Related Calculators

Matrix Calculator

Visit Matrix Calculator