Skip to content

node vector math

Blossom Merz edited this page Oct 6, 2026 · 4 revisions

Home > Data > Vector Math

< Previous: Math | Next: Compare >

Node Library

Vector Math node icon   Vector Math (node)

Arithmetic on vectors, with the operation chosen on the node: Add, Subtract, Scale, Normalize, Dot and Cross.

Vector Math node diagram

Category: Data | Add menu: Data > Numbers > Vector Math

Note

This node used to be called Vector Add. It is the same node with more operations on it, so anything written about Vector Add applies here.

A vector is a segment, not a point

This is the one thing to get straight before the rest makes sense. Throughout Locus, a vector is a segment, a line that runs from its own start to its own end. A bare point is a location, not a displacement, so a point on its own does not say how far or which way.

The node will still take one. A point handed to a vector input is read as the displacement from Base to that point, which is the only reading available. A segment is read as start to end, and Base has nothing to do with it.

An unwired vector input counts as zero. That is what makes Add with a single vector wired read as "move this by that much", the behavior the old Vector Add had.

Inputs

  • Vector 1 (any): a segment, or a point read against Base.
  • Vector 2 (any): the same. Ignored by Scale and Normalize, which use Vector 1 alone.
  • Scalar (number, editable): the multiplier for Scale, default 2. The other operations ignore it.
  • Base (point): where the result is drawn from, and what a bare point input is measured against. Default is the origin.

Outputs

  • Vector (curve): the result as a segment, running from Base to Base plus the result.
  • Tip (point): the far end of that segment, on its own.
  • Value (number): a number that depends on the operation, below.

The operations

Pick one from the pulldown on the node body, the same way Math works. The default is Add.

Operation Reads What it gives back Value carries
Add Vector 1, Vector 2 Vector 1 plus Vector 2 the length of the result
Subtract Vector 1, Vector 2 Vector 1 minus Vector 2 the length of the result
Scale Vector 1, Scalar Vector 1 times Scalar the length of the result
Normalize Vector 1 alone Vector 1 at length 1, same direction the length of the result, which is 1
Dot Vector 1, Vector 2 nothing the dot product
Cross Vector 1, Vector 2 nothing the cross product

The first four are vector answers, so Vector and Tip carry the result and Value comes along free, which saves reaching for Length.

Dot and Cross are number answers. There is no vector to draw, so Vector and Tip come back empty and Value is the whole result.

Two of them work on one vector. Scale and Normalize read Vector 1 alone and ignore Vector 2 entirely, so leaving it unwired changes nothing about what they give back. Scale is also the only operation that reads Scalar; the other five ignore it. Base is read by all six, because it is what a bare point input gets measured against, and it is where the four vector answers start from.

One diagram per operation

The same Vector 1 and Vector 2 run through all six, so the diagrams can be read against each other: only the interaction changes. Each one shows the inputs it reads at the top, then what the operation makes of them, drawn from Base.

Add. The givens strip at the top shows Vector 1 and Vector 2 as two separate green arrows. Below the rule, Vector 1 runs from the navy Base point, a dashed green copy of Vector 2 carries on from its head, and the heavy green answer runs from Base to the far end, where a hollow blue ring marks Tip.

Subtract. The givens strip shows Vector 1 and Vector 2 as two separate green arrows. Below the rule, Vector 1 runs from the navy Base point and a dashed green copy of Vector 2 runs backward from its head, so the heavy green answer from Base ends below the axis, with a hollow blue ring marking Tip.

Scale. The givens strip shows Vector 1 alone, because Scale does not read Vector 2. Below the rule, the shorter green Vector 1 lies along the heavy green answer, which is twice as long and marked Scalar 2 in number purple, with a hollow blue ring marking Tip at its far end.

Normalize. The givens strip shows Vector 1 alone, because Normalize does not read Vector 2. Below the rule, a dashed unit circle is centered on the navy Base point, green Vector 1 reaches well past it, and the heavy green answer stops exactly on the circle with a hollow blue ring marking Tip, its length marked 1 in number purple.

Dot. The givens strip shows both vectors. Below the rule, both run from the navy Base point with the angle between them arced, a dashed line drops from the head of Vector 2 onto Vector 1, and the length it lands on is drawn as a heavy dark bar. There is no answer arrow, because the answer is a number, marked Value in number purple.

Cross. The givens strip shows both vectors. Below the rule, both run from the navy Base point and the parallelogram they make between them is filled number purple, because the answer is a number. The angle is arced, and a number purple plus sign above the word Value marks the answer as positive, which it is because Vector 2 turns counterclockwise from Vector 1.

Two details worth knowing

Normalizing nothing gives nothing. A vector of zero length has no direction to preserve, so Normalize hands back zero rather than dividing by almost nothing and throwing the result off to infinity.

Cross is a signed number, and the sign is the useful part. In two dimensions the cross product is one number: the signed area of the parallelogram the two vectors make. It is positive when Vector 2 turns counterclockwise from Vector 1 and negative when it turns clockwise. That makes it the short answer to "which side of this is that", which is a question that comes up far more often than the area does.

< Previous: Math | Next: Compare >

Related

  • Math: the same idea for plain numbers.
  • Move: the usual destination for the Vector output.
  • Array: Directed: reads its direction inputs as vectors the same way this node does.
  • Length: when the length is all you were after.

Locus Studio Docs

Home

Getting Started

Modeling - Drawing

Modeling - Editing

Annotation

Layers

Modeling Menus

The Nodes Window

Node Library

Clusters

Bridging Modeling & Nodes

Patterns & Symmetry

Image-Driven Fields

Saving, Exporting & Files

Preferences & Language

CLI

Reference

Clone this wiki locally