Approxiverse
Math

A vector calculator

Two east and one north takes you somewhere no single number describes, and the straight arrow that gets you there is never longer than the walk.

A vector is a quantity that carries a direction as well as a size: a wind, a push, a velocity, a walk across town. Two of them cannot be added by adding their lengths, because the directions can agree, fight, or do anything in between.

Add the parts, not the lengths

They add by their parts instead. Two east and one north is written (2, 1); three west and two north is (−3, 2), west being east made negative, which saves inventing a second kind of number. Add the east parts, add the north parts, and the answer is (−1, 3): one west, three north. The lengths never come into it, and the length of the answer comes back out afterwards by Pythagoras.

Drawn, that is tip to tail. Slide the second arrow across until its tail sits on the first one’s tip, and the answer runs from where you set off to where you finished. Subtracting is the same move with the second arrow turned round, which is why A − B points from B towards A.

Loading the calculator…
Drag either handle or type into the boxes; the answer runs from the start of the walk to its end.

Point both arrows the same way and the answer comes out exactly as long as the two of them end to end, which is the only arrangement where that happens. Swing them apart and it shrinks.

Up is a third column

Adding height changes nothing about the arithmetic. Three columns go in instead of two, and the length is still the diagonal, now across a box rather than a rectangle. What changes is how you say where something points: on flat ground one angle does it, and off the ground you need two, a compass bearing for the shadow the arrow casts and an angle above the horizon for the climb.

Three dimensions also make room for the cross product. Given two arrows, exactly one line runs square to both, and it points along that line. Its length is the area of the parallelogram the two arrows stretch between them, so it swells as they open out and collapses to nothing when they line up. It is how a screw knows which way to travel through wood.

Loading the calculator…
The same arithmetic with a third column, and one operation the plane has no room for.

x runs east, y runs north and z runs up off the ground, so a negative is simply the other way along the same line. Angles are in degrees, and every figure is rounded to two decimal places on its way to the screen.