Math
Vector analysis calculator
The calculations that sit one step beyond the dot and cross product: volumes from the triple product, tests for whether vectors are coplanar or independent, areas from two sides, and an orthogonal basis by Gram–Schmidt. Pick a calculation and the inputs it needs appear.
Separate components with spaces or commas. Any number of components.
Show the working, step by step
The triple product equals the determinant with a, b, c as rows.
a · (b × c) = det20113−1014Work out b × c.
b × c = ⟨13, −4, 1⟩
Dot with a.
a · (b × c) = 2×13 + 0×(−4) + 1×1 = 27 Check by determinant: 27
The product is not 0, so the vectors are not coplanar, and the volume is |27| = 27.
Cyclic order does not change the value: a · (b × c) = b · (c × a) = c · (a × b). Swapping two vectors flips its sign.
The formulas
a · (b × c) = det [a; b; c] volume of parallelepiped = |a · (b × c)| a × (b × c) = b(a · c) − c(a · b) area of parallelogram = |a × b| area of triangle = ½ |a × b| Gram–Schmidt: uₖ = vₖ − Σⱼ (vₖ · uⱼ ÷ uⱼ · uⱼ) uⱼ, eₖ = uₖ ÷ |uₖ|
Worked example: the scalar triple product
With the default vectors a = ⟨2, 0, 1⟩, b = ⟨1, 3, −1⟩, c = ⟨0, 1, 4⟩:
- b × c = ⟨3×4 − (−1)×1, (−1)×0 − 1×4, 1×1 − 3×0⟩ = ⟨13, −4, 1⟩.
- a · (b × c) = 2×13 + 0×(−4) + 1×1 = 27.
- The parallelepiped has volume 27 cubic units; the tetrahedron with the same three edges has 27 ÷ 6 = 4.5.
- The product is not 0, so the vectors are not coplanar, and it is positive, so they form a right-handed set.
Swapping any two of the vectors changes the sign to −27; moving them round in a cycle (b · (c × a), c · (a × b)) leaves it at 27.
Worked example: the vector triple product
Rather than two cross products, use a × (b × c) = b(a · c) − c(a · b), often remembered as “BAC minus CAB”. With the same vectors, a · c = 4 and a · b = 1, so a × (b × c) = 4⟨1, 3, −1⟩ − 1⟨0, 1, 4⟩ = ⟨4, 11, −8⟩. The brackets matter: (a × b) × c works out to ⟨6, 12, −3⟩, a different vector.
Worked example: Gram–Schmidt
Start from v₁ = ⟨1, 1, 0⟩, v₂ = ⟨1, 0, 1⟩, v₃ = ⟨0, 1, 1⟩.
- u₁ = v₁ = ⟨1, 1, 0⟩.
- v₂ · u₁ = 1 and u₁ · u₁ = 2, so u₂ = v₂ − ½u₁ = ⟨1/2, −1/2, 1⟩.
- v₃ · u₁ = 1 (÷ 2 gives ½) and v₃ · u₂ = ½ with u₂ · u₂ = 3/2 (ratio 1/3), so u₃ = v₃ − ½u₁ − ⅓u₂ = ⟨−2/3, 2/3, 2/3⟩.
- Divide by the lengths √2, √6/2 and 2√3/3 to get an orthonormal basis.
Every pair of u vectors has dot product 0; the calculator checks that. If one of the input vectors depends on the earlier ones it reduces to the zero vector and is dropped, which is itself a test for independence.
Which test to use
| Question | Test | Answer “yes” when |
|---|---|---|
| Are two vectors perpendicular? | Dot product | a · b = 0 |
| Are two 3D vectors parallel? | Cross product | a × b = 0 |
| Are three 3D vectors coplanar? | Scalar triple product | a · (b × c) = 0 |
| Are k vectors independent? | Rank of the matrix of columns | rank = k |
| Are three points collinear? | Triangle area | area = 0 |
Common mistakes
- Forgetting the absolute value. A volume or area is never negative; the triple product can be.
- Halving twice. |a × b| is already the parallelogram. Halve it once for the triangle.
- Using the vertices instead of the sides. For a triangle PQR, cross Q − P with R − P, not P with Q.
- Normalising too early in Gram–Schmidt. Working with the unnormalised uₖ keeps the arithmetic in fractions; divide by the lengths at the end.
Common questions
What does the scalar triple product represent?
a · (b × c) is the signed volume of the parallelepiped (slanted box) with edges a, b and c. Its absolute value is the volume; the sign says whether a, b, c form a right-handed (+) or left-handed (−) set. It equals the determinant of the 3×3 matrix with a, b, c as rows. A tetrahedron on the same three edges has one sixth of that volume.
How do I check whether three vectors are coplanar?
Compute the scalar triple product. If it is 0, the box they span has no volume, so the three vectors lie in one plane. ⟨1, 2, 3⟩, ⟨4, 5, 6⟩ and ⟨7, 8, 9⟩ are coplanar: the determinant is 0, and indeed the third vector is 2 × the second − the first.
How do you test vectors for linear independence?
Put them in as the columns of a matrix and row-reduce. They are independent exactly when every column has a pivot, that is, when the rank equals the number of vectors. For n vectors in n dimensions the quicker test is a non-zero determinant. More than n vectors in n dimensions are always dependent.
What is the Gram–Schmidt process used for?
It turns any set of independent vectors into an orthogonal (or orthonormal) set with the same span. That gives a convenient basis for projections and least-squares fitting, and it is the idea behind the QR decomposition of a matrix. Each new vector has its components along the earlier ones subtracted, so what remains is perpendicular to all of them.
How do I find the area of a triangle from its vertices?
Take two sides as vectors from one vertex, PQ = Q − P and PR = R − P, and halve the length of their cross product. For P(1, 0, 0), Q(0, 2, 0), R(0, 0, 3): PQ × PR = ⟨6, 3, 2⟩, whose length is 7, so the area is 3.5. In 2D the same idea gives ½|x₁y₂ − x₂y₁|.
Related calculators
-
Cross product
a × b with the determinant expansion and the right-hand rule.
-
Vector calculator
Dot product, angle, projection and unit vectors.
-
Determinant calculator
The triple product is a 3×3 determinant; see it expanded.
-
Matrix calculator
Rank, RREF, inverse and eigenvalues.