b2KIT

3D Vector Visualizer

Manipulate 3D vectors in a rotatable WebGL scene. Compute cross products, projections, and visualize planes and normal vectors.

Tested tool guide Tested browser tools Checked August 16, 2026

What 3D Vector Visualizer does, with a checked example

Give the tool two vectors as (x, y, z) triples, and it draws them as colored arrows in a WebGL scene you can drag to rotate and zoom. Next to the scene it reports the dot product, both magnitudes, the cross product, and the projection of one vector onto the other. From any two non-parallel vectors it also draws the plane they span, with the normal arrow standing on it. The usual surprise: the cross product is not commutative. Swapping the two inputs negates every component of the result and flips the normal to the other side of the same plane. Both answers are valid, so the output depends entirely on the order you typed the vectors in.

Worked example

A concrete input and expected output from the current implementation.

Input

a = (1, 2, 0) and b = (3, 0, 4)

Expected output

a dot b = 3; |a| = 2.236, |b| = 5; a x b = (8, -4, -6); projection of a onto b = (0.36, 0, 0.48)

The cross product is (a2*b3 - a3*b2, a3*b1 - a1*b3, a1*b2 - a2*b1) = (2*4 - 0*0, 0*3 - 1*4, 1*0 - 2*3) = (8, -4, -6). It is perpendicular to both inputs: a dot (8, -4, -6) = 8 - 8 = 0 and b dot (8, -4, -6) = 24 - 24 = 0. The projection is (a dot b / |b|^2) b = (3/25)(3, 0, 4) = (0.36, 0, 0.48).

How the result is produced

1

Vector entry and scene

Each vector is a single ordered triple, read in the order x, y, z, and every arrow is anchored at the origin of a labeled three-axis grid. You drag to orbit the camera and scroll or pinch to zoom. The axis labels keep the orientation readable while the scene rotates, and the two vectors keep distinct colors so you can tell them apart from any angle.

2

What it computes

The dot product a1*b1 + a2*b2 + a3*b3, the magnitudes |a| = sqrt(a dot a), and the cross product returned as a new triple. The projection of a onto b is (a dot b / |b|^2) b, the component of a that runs along b. When a and b are not parallel, the plane containing them is drawn and its normal, the cross product, is shown as an arrow rising from the plane.

Good uses

  • Verifying a hand-computed cross product before trusting it in code - torque, angular momentum, and 3D graphics normals all use it, and seeing the arrow perpendicular to both inputs confirms the sign.
  • Choosing the normal direction for a surface: build the plane from two edge vectors and rotate the scene to see which side of the plane the normal leaves from.
  • Decomposing a vector along a direction: enter a force or a velocity together with the axis and read off the projection, the part of the vector that actually acts along that line.

Limits and checks

  • Order matters: a x b and b x a are exact opposites. The plane built from the pair looks identical either way, so a flipped normal is easy to miss unless you read the sign of the components.
  • Parallel, anti-parallel, or zero inputs give the zero cross product (0, 0, 0), which has no direction and cannot define a plane. No plane or normal appears for such a pair.
  • The length |a x b| = |a||b| sin(theta) is the area of the parallelogram the two vectors span, so nearly parallel vectors produce a very short cross product even though the plane exists and is legitimate.

Common questions

Why did the normal flip when I swapped the two vectors?

Because a x b = -(b x a). Both results are perpendicular to the same plane and have the same length, but they point to opposite sides. Which side your problem needs is a convention, usually set by the right-hand rule. If you require a specific side, type the vectors in the order your formula expects rather than relying on visual inspection.

I entered two vectors and no plane appeared. Is my input wrong?

Probably not. If the two vectors are parallel, anti-parallel, or one of them is the zero vector, the cross product is (0, 0, 0) and there is no unique plane through them, so nothing can be drawn. Replace one vector with a direction that is not a scalar multiple of the other and the plane and normal will appear.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools