Dot Product Calculator

Type matching coordinates for two vectors, pick 2D through 4D, and read the scalar plus angle and projection detail without sending tuples off your machine.

Dot product workspace

Calculator

Inputs on the left update the readout on the right as you type.

Options

Sample vectors

Coordinates

Each row is one axis. The first field is A, the second is B.

Results

A · B

0

Term breakdown
Arrow panel

4D mode hides this panel because the sketch only covers two or three coordinates.

Why a zero dot product still trips people up

Many courses stress that orthogonal means dot equals zero, then move on.

The uncomfortable detail is the zero vector: if either arrow has length zero, the angle story collapses, cosine is not meaningful, and you should read the scalar as a raw sum of products instead of trusting a geometric slogan.

This workspace keeps both stories visible. You always see the numeric sum. The angle chips grey out the cosine when a length hits zero so you do not pretend θ still exists.

From typed components to one number

The tool multiplies each matching pair of coordinates, adds those products, and shows the running layout in the open “Term breakdown” drawer.

Parallel to the sum, it computes the Euclidean lengths of A and B, derives θ through the standard arccos guard rail on the ratio (A · B) / (|A||B|), and prints cosine when both lengths stay positive.

Projection rows appear only when both lengths are positive. They reuse the same dot value you already see in the headline scalar.

We recommend treating 4D mode as algebra-only here. The arrow panel intentionally switches off so you are not tempted to read a 2D sketch as if it were the full 4D picture.

Same job, three different notations

Authors switch symbols depending on the textbook. The table below lists one plain-language gloss for each form so you recognize the same operation under a new name.

Symbol habitWhat you type hereWhat the page returns
A · B with coordinate tuplesMatching rows x, y, z, …Sum of aibi plus angle readouts when lengths allow
|A||B| cos θSame tuples (θ inferred)θ and cos θ chips after lengths are computed
Row vector times column vectorStill the same coordinatesIdentical scalar, because matrix multiply reduces to the same pairwise products

When you already keep everything inside three dimensions and want cross products or subtraction in the same session, the vector calculator page bundles those operations next to the scalar lane.

Where this page refuses to help

Floating-point arithmetic means cosines near ±1 sometimes drift by a tiny epsilon after rounding, so arccos input is clamped to [-1, 1] before the angle call.

The plot is a teaching aid, not a CAD viewport. It uses a fixed isometric-style projection for 3D and a standard xy plane for 2D, so lengths in the drawing are not measured in physical units.

If you need symbolic simplification, exact radicals, or variable letters instead of decimals, use a computer algebra system. This interface stays numeric.

Quick scenes that use A · B

For pure perpendicular magnitude in ℝ³, pair this scalar check with the cross product calculator when you need a vector orthogonal to both inputs.

Dot product questions we hear often

Short answers tied to the fields above.

Why does cosine say n/a while the scalar still shows a number?

Cosine divides the dot product by both lengths. If either vector has length zero, that ratio is undefined, so the chip prints n/a while the algebraic sum of products remains valid.

Does 4D mode change the formula?

No. It still sums a_i b_i across every coordinate. The only change is the arrow panel hides itself because the drawing cannot faithfully show four axes at once.

How do I copy something my grader will accept?

Use Copy scalar line. It writes the tuple form, a middle dot, and the rounded scalar so you paste into notes or email without retyping parentheses.

What does the orange projection arrow mean?

With Show projection enabled, the sketch draws the vector projection of the first arrow onto the second when the second has non-zero length. It mirrors the numeric proj rows in the drawer.

Is my data uploaded?

No. All arithmetic runs in the browser session you already opened. Clearing the tab clears the numbers.