# Label a graph using Math Input

**URL:** <https://cl.desmos.com/t/label-a-graph-using-math-input/1280>\
**Category:** Questions\
**Created:** [August 4, 2020, 9:07pm UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280 "2020-08-04T21:07:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evan\_Weiner](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/evan_weiner/32/647_2.png) [@Evan\_Weiner](https://cl.desmos.com/u/Evan_Weiner)\
**Post date:** [August 4, 2020, 9:07pm UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280/1 "2020-08-04T21:07:05Z")

</div>

Hey all,

I’m trying to have students compare a function they typed as a math input on a previous screen with another hypothetical student’s function. I know I can label the graph of the hypothetical student’s function by creating a point and labeling it `D(x) = 3x+8`. But I don’t know how to dynamically label the other function on the graph, with something like `f(x) = ${what_the_student_wrote}`.

Here’s the activity I’m working on: anyone know the best way to do this?

Thanks in advance,  
Evan

> **[A2.U2.L3.3 Asynchronous Version • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f29c799db447f3214ea16d8)**
>
> Let's make some curves!

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 4, 2020, 10:37pm UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280/2 "2020-08-04T22:37:45Z")

</div>

Looking at your graph. First, name your point, so `A=(-1,f(-1))`. Then you can use pointLabel in the CL to dynamically label point A.

`pointLabel("A"): "f(x)=${s}"`

---

<div class="post-metadata">

**Author:** ![Evan\_Weiner](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/evan_weiner/32/647_2.png) [@Evan\_Weiner](https://cl.desmos.com/u/Evan_Weiner)\
**Post date:** [August 5, 2020, 10:18pm UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280/3 "2020-08-05T22:18:56Z")

</div>

I don’t want to label the point with its value, but rather the expression that the student typed in on the previous slide. So I’d like the label to say f(x) = x + 8 or f(x) = -5x + 8, depending on what the student typed on the slide before. Is there a way to do that?

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [August 5, 2020, 11:43pm UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280/4 "2020-08-05T23:43:55Z")

</div>

@Daniel_Grubbs suggestion should work. Labeling the point in the graph allows you to use CL to call on the previous slide’s latex. Here’s what it looks like:

> **[\[Copy of\] A2.U2.L3.3 Asynchronous Version • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f2b428317e28454efcc731d)**
>
> Let's make some curves!

---

<div class="post-metadata">

**Author:** ![Evan\_Weiner](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/evan_weiner/32/647_2.png) [@Evan\_Weiner](https://cl.desmos.com/u/Evan_Weiner)\
**Post date:** [August 6, 2020, 4:19am UTC](https://cl.desmos.com/t/label-a-graph-using-math-input/1280/5 "2020-08-06T04:19:42Z")

</div>

Ah, that makes sense! I missed the {s} in @Daniel_Grubbs’s example. Thanks both!
