Drag to rotate the view
Controls
What to show
Readings
- Vector a
- (3, 0, 0)
- Vector b
- (1, 2, 0)
- Lengths |a|, |b|
- 3, 2.24
- Sum a + b
- (4, 2, 0)
How to use this simulation
- Two arrows start at the origin O. Vector a is the primary-colour arrow and vector b the secondary-colour one. At the start a = (3, 0, 0) and b = (1, 2, 0). The grey lines are the x, y and z axes, and the faint grid is the floor, where z = 0.
- Drag anywhere on the picture to turn the scene. It is a flat screen, so depth is shown by the way the axes and arrows swing round as you rotate. While play is on, the view also spins slowly by itself. Press pause to hold it still.
- Use the six sliders to set the x, y and z parts of a and of b. Every reading updates at once, and each arrow moves to its new tip.
- Choose “Sum” and an orange arrow runs from O to the far corner of a shaded parallelogram. That arrow is a + b. The dashed sides show b laid at the tip of a, and a laid at the tip of b: both routes end at the same point.
- Choose “Dot product”. The green arrow is the shadow of b on a, and the arc marks the angle θ between the vectors. The readings give a · b and θ.
- Choose “Cross product”. The orange arrow is a × b. It stands at right angles to both a and b, and the shaded parallelogram has the area the readout gives. If the arrow gets too long to fit, it is drawn shorter and the picture says so.
What is a vector?
Some quantities need only a number: your age, the price of a pen. Others need a direction as well. “Walk 5 metres” is incomplete; “walk 5 metres north” is a complete instruction. A vector carries both: how much, and which way. We draw it as an arrow.
In 3D we write a vector by its three components, how far it goes along x, along y and along z. So (3, 0, 0) is an arrow of length 3 pointing straight along the x axis. The length, or magnitude, comes from Pythagoras applied twice: |v| = √(x² + y² + z²).
Adding vectors: the parallelogram
To add two vectors, add the matching components. With a = (3, 0, 0) and b = (1, 2, 0) the sum is (4, 2, 0). No arrows needed, just three small additions.
The picture shows why that works. Walk along a, then along b, and you finish where the diagonal of the parallelogram ends. Walk b first, then a, and you land in the same place. That is why a + b = b + a.
- Subtracting is the same with minus signs: a − b is a plus the reverse of b.
- Scaling a vector by 2 doubles each component and doubles the length, with the direction unchanged.
- The length of the sum is not the sum of the lengths. Here |a| = 3 and |b| = 2.24, but |a + b| is shorter than 3 + 2.24, because the arrows do not point the same way.
| a | b | a + b | a · b |
|---|---|---|---|
| (3, 0, 0) | (1, 2, 0) | (4, 2, 0) | 3 |
| (1, 2, 3) | (4, -1, 2) | (5, 1, 5) | 8 |
| (2, -1, 3) | (1, 5, 1) | (3, 4, 4) | 0 |
| (1, 0, 0) | (0, 1, 0) | (1, 1, 0) | 0 |
How a flat screen shows 3D
There is no 3D library here, only a flat canvas and a bit of trigonometry. The scene is turned about the vertical z axis by one angle (the yaw) and tipped towards you by another (the pitch). Each point (x, y, z) is then squashed onto the screen, keeping its sideways position and its height.
Because nothing is drawn nearer or farther, parallel lines stay parallel (an orthographic view, like an engineer’s drawing). Rotation is what tells your eye which way is which. Drag a few times, and the flat arrows start to look solid.
The dot product: one number
Multiply matching components and add the three results: a · b = ax·bx + ay·by + az·bz. For the starting pair that is 3. Notice that the answer is a plain number, not a vector, which is why it is also called the scalar product.
There is a second formula for the very same number: a · b = |a| |b| cos θ, where θ is the angle between the arrows. Put the two together and you can find any angle in 3D without drawing it: cos θ = (a · b) / (|a| |b|).
For the starting pair this gives θ = 63.43°, which is what the Dot product mode reports.
a · b = ax·bx + ay·by + az·bzcomponents
a · b = |a| |b| cos θlengths and angle
- Positive dot product: the angle is less than 90°, the arrows lean the same way.
- Zero dot product: exactly 90°. The vectors are perpendicular (orthogonal).
- Negative dot product: the angle is more than 90°, the arrows lean opposite ways.
| θ (degrees) | a · b when |a| = 1, |b| = 2 |
|---|---|
| 0 | 2 |
| 60 | 1 |
| 90 | 0 |
| 120 | -1 |
| 180 | -2 |
The dot product as a shadow
Shine a light straight down onto a, and b casts a shadow along a. The signed length of that shadow is (a · b) / |a|. The dot product is then |a| times the shadow, which is the same as |b| times the shadow of a on b.
In the simulation that shadow is the green arrow, and the dashed line drops from the tip of b to the end of the shadow at a right angle. Drag b round: the shadow flips to the other side of O when the angle passes 90°.
The cross product: a new arrow
The cross product a × b is a vector, not a number. Each component is built from the other two coordinates, as the formula below shows.
For the starting pair it is (0, 0, 6): straight up along z. That is no accident, because a and b both lie flat in the floor, and the only direction at right angles to the floor is up or down.
a × b = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx)x, y, z components
|a × b| = |a| |b| sin θits length
- a × b is perpendicular to both a and b. Check by taking its dot product with either: it is 0.
- Its direction follows the right-hand rule: curl the fingers of your right hand from a towards b and your thumb points along a × b.
- Its length |a × b| is the area of the parallelogram. For the starting pair the area is 6 square units, the shaded shape in Cross product mode.
- If a and b are parallel the parallelogram is flat, the area is 0, and the cross product is the zero vector.
Order matters for the cross product
Swap the vectors and the arrow flips: b × a = −(a × b). The dot product has no such twist, a · b = b · a. The unit vectors i, j, k along the three axes show the pattern in the cleanest form.
| Product | Result |
|---|---|
| i × j | (0, 0, 1) |
| j × i | (0, 0, -1) |
| j × k | (1, 0, 0) |
| k × i | (0, 1, 0) |
| i × i | (0, 0, 0) |
Dot or cross: which one when?
Both combine two vectors, but they answer different questions.
| Dot product a · b | Cross product a × b | |
|---|---|---|
| Result is a | number | vector |
| Uses | angle, projection, work | area, perpendicular direction, torque |
| Zero when | vectors are perpendicular | vectors are parallel |
| Swap the order | unchanged | flips sign |
| Biggest when | vectors point the same way | vectors are perpendicular |
Try it in the simulation
Six quick experiments, a minute each.
- In Sum mode set b to (0, 3, 0). The shaded shape becomes a rectangle. Why are the sides at right angles?
- In Dot product mode make b equal to a. The angle is 0° and a · b = |a|².
- Set a to (2, 0, 0) and drag the b x-slider from 4 down to −4. Watch the dot product pass through zero and change sign.
- In Cross product mode make b a multiple of a, like (6, 0, 0). The area is zero and the arrow vanishes.
- In Cross product mode set a = (3, 0, 0) and b = (0, 2, 0). The arrow points up with length 6. Now swap the two values. Which way does the arrow go?
- Give both vectors a non-zero z. Rotate the view until a, b and a × b look like three corners of a box.
Solved problems
Six common questions. Every number below is computed with the same functions as the simulation.
Problem 1: everything for one pair
Let a = (1, 2, 3) and b = (4, -1, 2). Find a + b, a · b, the angle, a × b and the area.
Sum: (5, 1, 5). Dot product: 1·4 + 2·(−1) + 3·2 = 8. Lengths: |a| = 3.74 and |b| = 4.58. So cos θ = 8 ÷ (3.74 × 4.58) and θ = 62.2°.
Cross product: (7, 10, -9). Its length is the parallelogram’s area, 15.17.
Problem 2: are two vectors perpendicular?
Test a = (2, -1, 3) and b = (1, 5, 1). The dot product is 2·1 + (−1)·5 + 3·1 = 0. A zero dot product means a right angle, and indeed the angle is 90°.
Problem 3: angle without a calculator drawing
Find the angle between a = (1, 1, 0) and b = (0, 1, 1). Dot product: 1. Each has length 1.414. So cos θ = 1 ÷ (1.414 × 1.414) = 0.5, giving θ = 60°.
Problem 4: area of a triangle in 3D
Find the area of the triangle with corners A(1, 0, 0), B(0, 2, 0) and C(0, 0, 3).
Take the two sides from A: AB = (-1, 2, 0) and AC = (-1, 0, 3). Their cross product is (6, 3, 2), with length 7. That is the parallelogram, and the triangle is half of it: 3.5 square units.
Problem 5: projection
Project b = (2, 1, 5) onto a = (3, 4, 0). a · b = 10 and |a| = 5, so the length of the shadow is 10 ÷ 5 = 2. As a vector it is ((a · b)/|a|²) a = (1.2, 1.6, 0).
Problem 6: work done by a force
A force of (2, 3, 1) newtons moves an object by (4, 0, 5) metres. Work = F · d = 2·4 + 3·0 + 1·5 = 13 joules. No angle needed: the components do the job.
Mistakes to avoid
These cost marks again and again.
- Calling a · b a vector. It is a number. If you got three components, you computed something else.
- Using the cross product in two dimensions. It lives in 3D (the 2D version is a single number, the z component).
- Forgetting the order in a cross product, and so getting the sign of the answer wrong.
- Mixing up sin θ and cos θ: the dot product has cos θ and the cross product has sin θ.
- Adding lengths instead of components when finding |a + b|.
Where vectors are used
Games and film use the dot product to decide whether a surface faces the light, and the cross product to find which way a surface points. Physics uses the cross product for torque and for the force on a charge moving in a magnetic field. Engineers use the dot product for work and power.
Behind a phone map, a robot arm or a drone’s flight controller is a pile of exactly these two operations, run millions of times a second.
Exam corner
For HSC higher maths and admission tests, remember these.
- For perpendicular, set a · b = 0. For parallel, set a × b = 0 (or one is a multiple of the other).
- cos θ = (a · b) / (|a| |b|). Write the formula first, then substitute.
- The area of a parallelogram is |a × b|; the area of a triangle is half that.
- Check a cross product by dotting it with a and b. Both should give 0.
Frequently asked questions
What is the difference between the dot product and the cross product?
The dot product gives a single number that measures how much two vectors point the same way. The cross product gives a new vector that is perpendicular to both, with a length equal to the area of the parallelogram they span.
How do I find the angle between two 3D vectors?
Compute a · b, then |a| and |b|, and use cos θ = (a · b) / (|a| |b|). Take the inverse cosine of the result to get θ.
What does a zero dot product mean?
The two vectors are perpendicular (at 90°), provided neither is the zero vector.
What does a zero cross product mean?
The two vectors are parallel or antiparallel (angle 0° or 180°), or one of them is the zero vector. The parallelogram they span is flat, so its area is zero.
What is the right-hand rule?
Point the fingers of your right hand along a, curl them towards b, and your thumb points along a × b.
Why does the order of the cross product matter?
Because a × b and b × a point in opposite directions: b × a = −(a × b). The dot product is unaffected by order.
Keep studying this topic
The animation made the idea click; now turn it into marks. Syllabus, suggestions, textbooks and admission-test guides are below.
HSC
HSC Higher Mathematics: syllabus and preparation
Admission
Engineering admission test preparation
Textbook
Class 9-10 Higher Mathematics textbook
SSC
SSC Mathematics: syllabus and preparation
SSC
SSC Higher Mathematics: syllabus and preparation
Textbook
Class 9-10 Mathematics textbook
Admission
Jahangirnagar University mathematical and physical sciences unit
English
Paragraph: Artificial Intelligence
Bangla
রচনা: কৃত্রিম বুদ্ধিমত্তা (in Bangla)
SSC
SSC suggestions
HSC
HSC suggestions
Admission
University admission guide
SSC
SSC syllabus
HSC
HSC syllabus
Test prep
GRE Quantitative Reasoning guide
Test prep
Digital SAT Math guide
Scholarship
Scholarships to study abroad
Tool
Compound interest calculator
Career
Data scientist resume example
Career
Cover letter examples
More math animations
Grade 8–10
Pythagorean Theorem
The Pythagorean theorem explained: formula a² + b² = c², two proofs you can watch, the converse, Pythagorean triples and 10 worked examples. Drag the triangle yourself.
Grade 10–11
Trigonometric Ratios and the Unit Circle
Drag a point round the unit circle and watch sin, cos and tan change. Standard angle table, ASTC signs, identities, radians and graphs, with solved examples.
Grade 9–11
Quadratic functions and their graphs
Drag the vertex and change a, b, c to see how a quadratic function graph moves. Learn factoring, completing the square, the quadratic formula and discriminant.
Grade 9–10
Circle theorems
All the circle theorems with drag-and-check diagrams: angle at the centre, same segment, semicircle, cyclic quadrilateral, chords, tangents and alternate segment.
Grade 9–10
Heights and distances: elevation and depression angles
What angle of elevation and angle of depression mean, how the height-and-distance formula works, and how two observations solve a tower's height without ever measuring it — with an interactive simulation and solved problems.
Grade 9–11
Probability: experimental vs theoretical probability
What probability means, how the sample-space formula P(E) = n(E)/n(S) works, and why experimental frequency edges closer to theoretical probability the more you flip, roll or draw — with a coin, dice and coloured-ball simulator.
Grade 10–11
Arithmetic and Geometric Sequences
Learn the arithmetic and geometric sequence formulas for the nth term and sum, Gauss's pairing trick, and the sum-to-infinity formula a/(1−r), with a drag-and-slide bar-chart simulation and worked examples.
Grade 9–10
Mean, Median and Mode
Learn the mean, median and mode formulas, why the median resists an outlier while the mean does not, and the grouped-data median/mode formulas, by dragging points on a number line, with worked examples.
Grade 7–11
Sets and Venn Diagrams
Shade union, intersection, difference and complement on a live Venn diagram, drop numbers into regions, check n(A ∪ B) and test De Morgan’s laws, with solved problems.
Grade 8–10
Linear equations: graphs, slope and simultaneous pairs
See slope, intercepts and angle on a straight line, then graph two linear equations to find where they meet. Learn the ratio test for one, none or infinite solutions.
Grade 10–12
Graphs of sin, cos and tan
Plot y = A sin(Bx + C) + D with sliders: see amplitude, period, phase shift, range and the asymptotes of tan live. Trigonometric graphs with solved examples.
Grade 9–10
Completing the Square and the Quadratic Formula
Watch algebra tiles complete the square, then solve quadratic equations, find the vertex and see why the formula works. Free interactive simulation with solved examples.
Grade 7–10
Area of a Circle: Proof, Formula and Solved Problems
Cut a circle into slices, slide them into a rectangle and watch the area become πr². Free interactive simulation with circumference, pi, sectors, arcs and solved problems.
Grade 8–10
Volume and Surface Area of Solids: Cube, Cuboid, Cylinder, Cone, Sphere
Rotate six solids in 3D, unfold their nets and pour a cone into a cylinder to see why it takes exactly three. Free simulation with volume, CSA and TSA formulas and solved problems.
Grade 8–10
Similar Triangles: Scale Factor, AA, SSS, SAS and Shadow Heights
Scale a triangle with a slider and watch angles stay equal, side ratios stay k and area grow by k². Free interactive similar triangles simulation with AA, SSS, SAS tests and shadow problems.
Grade 9–11
Coordinate Geometry: Distance, Midpoint, Slope, Section Formula and Locus
Drag points on a grid and watch the distance formula, midpoint, slope and section formula update live. Free coordinate geometry simulation with the perpendicular-bisector locus and solved problems.
Grade 11–12
Conic Sections: Circle, Ellipse, Parabola and Hyperbola
Tilt a plane through a double cone and watch a circle, ellipse, parabola or hyperbola appear, with its standard equation, foci and eccentricity. Free conic sections simulation with solved problems.
Grade 9–11
Function Transformations: Shifts, Stretches and Reflections
Pick x², |x|, √x, sin x or 2^x and drag sliders for a, b, h and k. Watch shifts, stretches, squeezes and reflections move the graph, with the parent faded behind. Free simulation with solved problems.
Grade 11–12
Derivative as the Slope of a Tangent: Secant to Tangent
Drag a point P on x², x³, sin x, eˣ or 1/x and shrink the gap h to zero. Watch the secant become the tangent and its slope become the derivative, with the derivative graph below. Free simulation.
Grade 11–12
Riemann Sums and Integration: Area Under a Curve
Cut the area under x², x³, sin x, eˣ or √x into up to 100 strips and compare left, right, midpoint and trapezoid sums with the exact integral. Watch the error melt away. Free simulation.
Grade 11–12
Limits and the ε–δ Definition: A Visual Guide
See the epsilon-delta definition of a limit. Pick a function, shrink ε and watch the δ band follow it, with left and right limits, a hole, sin x / x and a jump where no δ works. Free simulation.
Grade 11–12
Matrix Transformations: Rotation, Reflection, Shear and the Determinant
Change a 2×2 matrix and watch the grid, a unit square and an F-shape move. See where i-hat and j-hat land, the determinant as signed area, and the inverse. Free simulation.
Grade 11–12
Complex Numbers: Sum, Product, Powers and Roots on the Argand Plane
Drag two complex numbers on the Argand plane. See the sum as a parallelogram, the product as a rotation and stretch, conjugates, powers as a spiral and roots of unity. Free simulation.
Grade 9–12
Binary Number System: Place Value, Conversion and Addition
Flip bits and see decimal, binary, octal and hex change together. Watch conversion by repeated division by 2, regrouping into octal and hex, and binary addition with carries. Free, with worked examples.
Animations in other subjects
Physics
Refraction of light
Physics
Ohm's law
Physics
Projectile motion
Physics
Simple pendulum
Physics
Electric field
Physics
Wave interference
Physics
Free Fall
Physics
Lens ray diagrams
Physics
Newton's Laws of Motion
Physics
Spherical mirror ray diagrams
Physics
Electromagnetic Induction
Physics
Conservation of Momentum and Collisions
Physics
Work, Energy and Power
Physics
Inclined Plane
Physics
Uniform circular motion
Physics
Transverse and Longitudinal Waves
Physics
Levers and moments
Physics
Centre of mass
Physics
Spring-mass SHM
Physics
Vector addition: triangle and parallelogram laws
Physics
Relative velocity: trains and river crossing
Physics
Kepler's laws and elliptical orbits
Physics
Newton’s law of gravitation, g and satellites
Physics
Standing waves in strings and pipes
Physics
Resonance tube and the speed of sound
Physics
Beats: when two close notes pulse
Physics
Doppler effect: moving sources, listeners and sonic booms
Physics
Prism, dispersion of light and the rainbow
Physics
Kirchhoff’s laws: junction rule and loop rule
Physics
Wheatstone bridge and metre bridge
Physics
Single-slit diffraction
Physics
Defects of the human eye and their correction
Physics
Polarisation of light: Malus’s law and Brewster’s law
Physics
Charging and discharging a capacitor: the RC time constant
Physics
Magnetic field lines: bar magnet, current-carrying wire and solenoid
Physics
AC generator
Physics
Transformer
Physics
Heat transfer: conduction, convection and radiation
Physics
Photoelectric effect: Einstein’s equation and the stopping potential
Physics
Motor effect: force on a current-carrying wire and the DC motor
Physics
Gas molecules and kinetic theory: pressure, temperature and speed
Physics
The semiconductor diode: p–n junction, I–V curve and rectifier
Physics
Radioactive decay: half-life, the decay law and penetration
Physics
The Bohr atom: orbits, energy levels and the hydrogen spectrum
Chemistry
Structure of the atom
Chemistry
Acids, Bases and the pH Scale
Chemistry
Electron configuration
Chemistry
Gas laws: Boyle, Charles, Gay-Lussac, Avogadro and PV = nRT
Chemistry
How an Ionic Bond Forms
Chemistry
Electrolysis and Faraday’s Laws
Chemistry
Covalent Bond
Chemistry
Periodic Trends
Chemistry
Reaction rate and collision theory
Chemistry
States of matter: solid, liquid, gas and the heating curve
Chemistry
Atomic orbitals: the shapes of s, p and d, quantum numbers and nodes
Chemistry
Molecular shapes and VSEPR theory: bond pairs, lone pairs and angles
Chemistry
The mole concept: molar mass, Avogadro’s number and molar volume
Chemistry
Diffusion and effusion: Graham’s law of gases
Chemistry
Balancing chemical equations: method, examples and practice
Chemistry
Chemical equilibrium: the equilibrium constant Kc and Le Chatelier’s principle
Chemistry
Titration: finding an unknown concentration with a burette and an indicator
Chemistry
Galvanic cell: the Daniell cell, EMF and the Nernst equation
Chemistry
Redox reactions: oxidation numbers, electron transfer and half-equations
Chemistry
Hydrocarbons: alkanes, alkenes, alkynes and structural isomers in 3D
Chemistry
Functional groups: alcohols, aldehydes, ketones, acids, esters and amines
Chemistry
Polymerisation: addition and condensation polymers, polythene and nylon
Chemistry
Separation techniques: filtration, distillation, chromatography, crystallisation
Chemistry
Crystal lattice: SC, BCC and FCC unit cells, packing efficiency and density
Chemistry
Radioactivity: Alpha, Beta, Gamma Decay and Half-Life
Biology
Mitosis cell division
Biology
Diffusion and Osmosis
Biology
Photosynthesis
Biology
The human heart: structure and function
Biology
Mendelian Genetics
Biology
DNA Replication
Biology
Cellular Respiration
Biology
Enzyme Action
Biology
The Nerve Impulse and the Action Potential
Biology
The Nephron and Urine Formation
Biology
Meiosis Cell Division
Biology
Digestive System
Biology
Breathing Mechanism: Inhalation and Exhalation
Biology
Protein synthesis
Biology
Blood circulation: double circulation and cardiac output
Biology
Cell structure and organelles: plant cell vs animal cell
Biology
Reflex action and the reflex arc
Biology
The human eye: parts, image formation and accommodation
Biology
Muscle contraction and the sliding-filament model
Biology
Transport in plants: xylem, phloem and transpiration
Biology
Food chain and food web: energy flow and the 10 % rule
Biology
Population growth: exponential and logistic curves
Biology
Natural selection: peppered moths and the sooty tree
Biology
Immune response: primary and secondary antibody response
Biology






















