Enter vectors
Example data
| Dimension | Vector A | Vector B | Dot (A·B) | Angle (deg) |
|---|---|---|---|---|
| 2D | ⟨3, 4⟩ | ⟨2, 1⟩ | 10 | 36.87 |
| 3D | ⟨1, -2, 3⟩ | ⟨4, 0.5, -1⟩ | 0 | 90 |
| 4D | ⟨1, 1, 1, 1⟩ | ⟨2, 2, 2, 2⟩ | 8 | 0 |
Formula used
How to use this calculator
- Select the vector dimension (1D to 20D).
- Enter all components for Vector A and Vector B.
- Choose rounding and an angle unit if needed.
- Click Calculate to view results above the form.
- Use CSV or PDF buttons to export your saved history.
Component-by-component multiplication
The calculator evaluates A · B by multiplying matching components and summing the products, Σ(aᵢbᵢ). This is the fastest general method and scales linearly with dimension n, so 20D inputs remain instant. For example, A=⟨1,−2,3⟩ and B=⟨4,0.5,−1⟩ produce products 4, −1, and −3, summing to 0.
Angle interpretation and orthogonality
With non‑zero magnitudes, cos(θ)=(A·B)/(|A||B|) turns the dot product into a geometric test. A dot of 0 implies θ≈90° (orthogonal directions). Positive dots correspond to acute angles and directional agreement, while negative dots indicate obtuse angles and opposition. The calculator clamps cos values to keep arccos stable under rounding.
Projection and directional work
Scalar projection of A onto B is (A·B)/|B|, and the projection vector is ((A·B)/|B|²)B. These outputs show how much of A lies along B, which is essential in physics and engineering. In mechanics, work is W=F·d, so a larger projection of force onto displacement increases work. In data analysis, projection explains similarity along a reference direction.
Dimension scaling and data entry
Choose 1D through 20D, then enter components for both vectors. Inputs are arranged in three columns on large screens, two on smaller devices, and one on mobile for clean entry. The “treat blanks as zero” option helps when you intentionally omit higher components. Use the example button to populate consistent test vectors before real data.
Precision, rounding, and numerical stability
Rounding controls display precision without changing the underlying arithmetic steps. Higher decimals help when vectors are nearly orthogonal and the dot product is small relative to |A||B|. The calculator reports magnitudes, unit vectors, and projections to cross‑check results. If either magnitude is zero, angle and projection fields are suppressed to prevent invalid divisions.
Exportable audit trail for coursework
Every calculation is saved to a session history (up to 50 rows) with timestamp, dimension, vectors, dot product, angle, and projections. Export to CSV for spreadsheets or to PDF for submission‑ready notes. This makes it easy to document lab work, verify homework, and reproduce results with the same rounding settings. Keep the exports as evidence during revisions and grading.
FAQs
1) What is the dot product used for?
The dot product measures directional similarity and produces a scalar. It appears in work calculations, projection, and cosine-based angle tests between vectors.
2) Can I use it for more than 3 dimensions?
Yes. Set the dimension up to 20 and enter components. The dot product definition is identical in any finite dimension.
3) Why is the angle missing sometimes?
Angle needs both |A| and |B| non‑zero. If a vector is all zeros, cos(θ) is undefined, so the calculator hides angle and projection outputs.
4) What does a negative dot product mean?
A negative dot product means the vectors point more opposite than aligned, so the angle is greater than 90° in Euclidean space.
5) How are projections computed?
Projection of A on B is ((A·B)/|B|²)B, and the scalar component is (A·B)/|B|. The calculator shows both when |B| is non‑zero.
6) What do the downloads include?
CSV and PDF exports are built from the saved session history. They include time, dimension, vectors, dot product, angle, cosine, and projection scalars for each run.