Skip to main content

Points, Labels, and Vectors

Points​

Enter (1,2)(1,2) to draw a point. Its size and style can be changed from the options to the left of the expression.

Loading graph…
Open in Desmos ↗

Labels​

Enable “Label” in a point’s options to display text. Hiding the point while keeping its label visible is also useful for placing text on a graph.

Loading graph…
Open in Desmos ↗

Displaying a variable​

Write ${variable name} in a label to insert its current value. If a=11a=11, the label a=${a} displays a=11 and updates as the slider moves.

Loading graph…
Open in Desmos ↗
Label alignment

For labels containing changing values, left alignment prevents the label from shifting as its length changes.

Label alignment options in Desmos

Typesetting labels with TeX​

Surround a label with backticks ` to typeset its contents as TeX. Use backticks, not single quotation marks.

Loading graph…
Open in Desmos ↗

Draggable points​

Coordinates containing variables, such as (a,b)(a,b), create a draggable point. (a,a2)(a,a^2) constrains the point to a parabola, and variable bounds can limit its range.

Loading graph…
Open in Desmos ↗

Because dragging updates the associated variables, one point can provide intuitive control over an entire construction.

Loading graph…
Open in Desmos ↗

Vectors​

Points also behave as vectors and support arithmetic and parametric expressions.

1
(1,0)+2(0,1)=(1,2)(1,0)+2(0,1)=(1,2)
2
(1,2)⋅(2,3)=8(1,2)\cdot(2,3)=8
3
∣(3,4)∣=5|(3,4)|=5
4
(2,2)+(1,0)t(2,2)+(1,0)t

Use (1,2).x and (1,2).y to access the coordinates. This makes it possible to build a function that rotates a vector by any angle.

Loading graph…
Open in Desmos ↗

The 2D calculator has no direct arrow-drawing function, so polygon() can be used to construct arrowheads.