How to Use the Vector Math Node in Blender

The Vector Math node in Blender is an essential tool used to manipulate 3D spatial data, directions, colors, and textures across the Shader Editor, Geometry Nodes, and Compositor. This guide provides a clear overview of how the Vector Math node operates, explains its primary math functions—such as Add, Multiply, Dot Product, and Normalize—and demonstrates how to apply these operations to solve common 3D modeling and shading tasks.


What is a Vector in Blender?

In Blender, a vector is a set of three values—typically representing X, Y, and Z coordinates. These values can describe:

  • Positions: A specific point in 3D space.
  • Directions: Arrow-like vectors pointing in a specific direction (such as surface normals).
  • Colors/Values: RGB channels processed as three-dimensional numeric data.

The Vector Math node takes one, two, or three input vectors, applies a mathematical operation across their components, and outputs the resulting vector or a single scalar value.


How to Add the Vector Math Node

  1. Open the Shader Editor or Geometry Nodes workspace.
  2. Press Shift + A to open the Add menu.
  3. Navigate to Vector > Vector Math.
  4. Click to place the node in your node tree.

Core Operations of the Vector Math Node

The node contains a dropdown menu with dozens of operations. Below are the most frequently used modes categorized by their function.

1. Basic Arithmetic (Component-Wise)

  • Add: Adds the X, Y, and Z values of Input A to Input B. Use this to shift texture coordinates or offset positions.
  • Subtract: Subtracts Input B from Input A. Subtracting an object's position vector from another creates a direction vector pointing from one to the other.
  • Multiply: Multiplies corresponding X, Y, and Z components together. Useful for scaling textures non-uniformly.
  • Divide: Divides Input A by Input B component-wise.

2. Scaling and Magnitude

  • Scale: Multiplies all three components (X, Y, Z) of a single vector by a single scalar value. This increases or decreases the vector's overall size without changing its direction.
  • Length: Calculates the distance from the origin (0, 0, 0) to the vector coordinate. It outputs a single scalar value representing the vector's overall magnitude.
  • Normalize: Adjusts the length of a vector to exactly 1.0 while maintaining its original direction. This is crucial when working with directional vectors, such as surface normals or lighting calculations.
  • Distance: Measures the straight-line distance between two point vectors (Input A and Input B).

3. Advanced Vector Operations

  • Dot Product: Compares two vectors and outputs a single value based on the angle between them.
    • Outputs 1.0 if both vectors point in the exact same direction.
    • Outputs 0.0 if the vectors are perpendicular (90 degrees apart).
    • Outputs -1.0 if they point in opposite directions.
    • Common Use: Masking the top of an object by comparing surface normals with an upward direction vector (0, 0, 1).
  • Cross Product: Takes two vectors and calculates a third vector that is perpendicular (at 90 degrees) to both.
    • Common Use: Calculating custom tangents, surface orientations, or curved geometry directions in Geometry Nodes.
  • Reflect: Calculates the direction of a vector reflecting off a surface using a specified normal direction vector.

Practical Examples

Example 1: Creating a "Top-Down" Snow Mask (Shader Editor)

To apply a material only to the upward-facing surfaces of an object:

  1. Connect a Texture Coordinate node's Normal output to Vector A of the Vector Math node.
  2. Set the Vector Math node operation to Dot Product.
  3. Set Vector B to X: 0, Y: 0, Z: 1 (pointing straight up).
  4. Run the scalar output into a ColorRamp node to control the sharpness of the mask.
  5. Use the output as a factor to mix a Snow Shader with your Base Shader.

Example 2: Moving Geometry Along Normals (Geometry Nodes)

To push mesh vertices outward based on their surface direction:

  1. Add a Set Position node in Geometry Nodes.
  2. Add a Normal node and connect it to a Vector Math node set to Scale.
  3. Use a single value slider (or a input value) to drive the Scale factor.
  4. Connect the output of the Vector Math node into the Offset input of the Set Position node.
  5. Adjusting the scale value will now expand or shrink the mesh along its normals.