You can define and perform operations on vectors in the 3D Calculator and Geometry Tool.
In both of these tools along with the 2D Graphing Calculator and Notebook, you can perform operations on points.
In all of these tools, you can also transform geometric objects using points.
Legacy Vector Behavior: If you open up a graph made before November 2026, you may see the message: “This graph relies on legacy vector behavior.” Previously, you could perform vector calculations on any vectors, but they are now supported only for vectors that start at the origin. If you click Update to new behavior, your graph will automatically rewrite these expressions while preserving the visual appearance of your graph.
Defining Vectors
You can define vectors several ways. Explore each of these strategies in the Defining Vectors example graph.
| Syntax | Try typing... | Graphs a vector with... |
|---|---|---|
| vector\((A,B)\) | vector\(\mathbf{((1,2),(3,4))}\) | starting point \(A\) and terminal point \(B\). |
| vector\((B)\) | vector\(\mathbf{((5,6))}\) | starting point \((0,0)\) or \((0,0,0)\) and terminal point \(B\). |
| vector\((x,y)\) or vector\((x,y,z)\) | vector\(\mathbf{(5,6)}\) | starting point \((0,0)\) or \((0,0,0)\) and terminal point \((x,y)\) or \((x,y,z)\). |
| vector\((A,v)\) | vector\(\mathbf{((1,2),}\) vector\(\mathbf{(3,4))}\) | a vector starting at \(A\) with displacement of vector \(v\). |
| vector\((v)\) | vector\(\mathbf{(}\)vector\(\mathbf{((1,2),(3,4))}\)\(\mathbf{)}\) | a vector starting at \((0,0)\) or \((0,0,0)\) with displacement of vector \(v\). |
Operations on Points and Vectors
In the following table, \(p\) and \(q\) represent points, and \(v\) and \(u\) represent vectors. Explore these operations in the Vector and Point Operations in 3D. example graph.
| Function | This function... |
|---|---|
| \(v\).start | plots the initial point of a vector. |
| \(v\).end | plots the terminal point of a vector. |
| \(|p|\) or \(|v|\) | outputs the magnitude of a vector or the distance from the origin to a point. |
| \(p \cdot q\) or \(v \cdot u\) | outputs the dot product scalar value. This is found by multiplying the \(x\)-components, \(y\)-components, and \(z\)-components (in 3D) and then summing the results. |
| The following operations are only supported for points or for vectors starting at the origin. | |
| \(p.x, p.y, p.z\) or \(v.x, v.y, v.z\) | outputs the \(x\)-, \(y\)-, and \(z\)-component of a point or the end point of a vector. |
| \(p + q\) or \(v + u\) | graphs the vector sum of two points or vectors. |
| \(p - q\) or \(v - u\) | graphs the vector difference of two points or vectors. |
| \(v \times u\) | graphs the vector perpendicular to the plane containing the original two vectors. The cross product is only defined in 3D. To get the \(\times\) symbol, type the word cross. |
Transformation Operations
You can also perform arithmetic operations on geometric objects to visualize transformations.
The objects you can transform depend on the tool you are using:
- 2D Graphing Calculator: Polygon
- 3D Calculator: Segment, vector, triangle, sphere
- Geometry Tool: Line, segment, ray, vector, polygon, circle, arc
In the following table, \(G\) represents one of these geometric objects.
| Syntax | Try typing... | This function... |
|---|---|---|
| Adding a point \(p\) | \(\mathbf{G+p}\) | adds the \(x\)- and \(y\)-coordinates of \(p\) to every point of \(G\), performing a translation. |
| Multiplying by a scalar constant \(k\) | \(\mathbf{kG}\) | multiplies the \(x\)- and \(y\)-coordinates of every point of \(G\) by \(k\), performing a dilation from the origin by scale factor \(k\). |
| Multiplying by a matrix \(M\) | \(\mathbf{MG}\) | performs a transformation by matrix multiplication on the points of \(G\) using \(M\). You can’t apply matrices to circle or arc objects in the Geometry Tool or spheres in the 3D Calculator. |
3D Vector Videos
Learn more about vectors in our Unlocking 3D videos series.
Learn More
- Getting Started: Desmos Geometry
- Getting Started: Desmos 3D
- Transformations: Desmos Geometry
- Supported Functions
Please write in with any questions or feedback to support@desmos.com.