# Different Kinds of Variables

Students sometimes ask whether the $$x$$ in the expression

$$2x$$ the same kind of thing as the $$x$$ in the equation

$$2x = 4.$$

In the expression $$2x, \;x$$ can be any real value.

However, in the equation $$2x = 4, \;x$$ can only be the value or values (from the some given set of real numbers) that makes the equation true.

Are there some mathematical principles by which we can explain why and how the use of $$x$$ is different? That is, is there a better explanation than simply telling students that $$x$$ has a different meaning in these situations? For example, could/should we tell students to interpret the equals sign as a question that asks which value(s) of $$x$$ make the expressions on both sides of the equation equal?

• @JoeTaxpayer: This is an excellent suggestion. I've made a major revision of the question in trying to capture both what you said and what Frasch was asking. Frasch --- If you don't like what I've done to your question, feel free to completely undo my edits, or revise my edits, as you see fit. – Dave L Renfro Jun 9 '19 at 18:12
• Check out my response to "What is a variable?" here and, especially, the paragraph from Velleman at the end. – Benjamin Dickman Jun 9 '19 at 18:40
• Related math.stackexchange.com/questions/3244699/meaning-of-an-equation (also by the OP). – user5402 Jun 9 '19 at 18:52
• @Namaste: I was trying to preserve the original version, which could easily have been asked by a less informed teacher. In particular, I can easily imagine the "could/should" issue being raised by some teachers I've known, and I also felt that preserving some aspects of the "simplistic view" would provide better fodder for answers. – Dave L Renfro Jun 10 '19 at 9:39
• @RustyCore: No! $y=2x$ is not a function but merely an equation. A graph in the $(x,y)$-plane is not the same as the function underlying the graph. – user21820 Jun 10 '19 at 16:31

$$2x$$ is an expression, a phrase. Compare it to "two ducks". This is neither true nor false. It doesn't have a 'truth value'.

$$2x = 4$$ is an equation, a statement. Compare it to "two ducks have four legs". This is true (edit: for the ducks, but not necessarily for the $$x$$).

The meaning of the word "ducks" has not changed. The grammar of what is with that word has.

If you replace "ducks" with "dogs", the "two dogs" phrase makes us think of something else, but doesn't feel much different grammatically than "two ducks". But "two dogs have four legs" would be false. Different values for the variable give different 'truth values'.

(This comparison isn't perfect, because the $$4$$ turned into $$4$$ legs some magical way. But I hope it helps you to see that $$x$$ isn't changing, just the grammar around it.)

• Potential quibble: $2x=4$ may be true or false depending what $x$ is, obviously. There is yet another math-verb: we (attempt to) require of $x$ that this equation/statement be true, without "knowing" what $x$ is otherwise. This kind of thing reasonably confuses students... – paul garrett Jun 22 '19 at 22:21
• I was saying the duck thing was true. I wonder if I can make that part clearer. – Sue VanHattum Jun 23 '19 at 17:11

I have read much of what is here, so, I'd wager the answer I'm about to offer will not be welcomed by some.

However, I think it might be useful to students to give the following answer:

• In $$2x$$ we have variable $$x$$ appearing in the expression $$2x$$.
• In $$2x = 4$$ we have variable $$x$$ being constrained by the equation $$2x=4$$. We could also call $$2x=4$$ a condition.

Really, $$x$$ is the same thing in both cases. It is a label for a quantity we do not know.

In both cases we assume $$x$$ can be multiplied by $$2$$. There is often a natural context for possible choices of $$x$$ given the source of the question. Especially if this is from an applied problem it may make sense to assume $$x$$ is a real variable. But, I think (depending on the student's attention span) expanding the point of context may be unwise in the first pass.

At least this is one reasonable interpretation before we find more abstract algebraic ways to think about $$x$$. Those abstract algebraic interpretations can wait for the next grade since this is just a question for the 10-year-old crowd.

For the function $$f(x)=2x$$, the letter $$x$$ is a variable; it can have any value in the domain of $$f$$. For the polynomial $$p(x)=2x$$, $$x$$ is an indeterminate that is just a placeholder. We can write the polynomial $$p$$ without it : $$p=(0,2,0,0,\ldots)$$.

$$2x=4$$ is an (algebraic) equation and $$x$$ is the unknown to be found.

• @user21820 "Let $f: \mathbb{R}\longrightarrow\mathbb{R}$ by $f(x)=2x$" is often shortened to "let $f(x)=2x$". – user5402 Jun 11 '19 at 14:18
• @user21820 I can accept y=2x as equation (of two variables). Equation evaluates to true or false when variables are replaced with actual values, like (2,4) turns the above equation true. But f(x) = 2x has just one independent variable, and the dependency is clearly identified with f(x) expression. Semantically this defines a function. I do agree that typical mathematical pedagogy is defective, though. ;-) – Rusty Core Jun 12 '19 at 21:39
• @user21820 Funny that you wrote in the chat what to me sound the same as I wrote: "How do we refer to the output of f on some input x? We use the notation "f(x)" to denote exactly "the output of f on input x". " – Rusty Core Jun 12 '19 at 21:58
• @user21820 This type of language shortcuts is everywhere. For example we say "the area of a triangle" even though a triangle is just three segments. We use L'Hôpital's rule on a sequence, we use the same function $f$ to denote $f:E\longrightarrow F$ and $f:\mathcal{P}(E)\longrightarrow \mathcal{P}(F)$, etc. – user5402 Jun 13 '19 at 13:56
• I removed the comments discussing things other than the answer and left the productive discussion here. – Chris Cunningham Jun 14 '19 at 12:15

Your question is based on a false premise.

However, in the equation $$2x=4$$, $$x$$ can only be the value or values (from the some given set of real numbers) that makes the equation true.

No! In the equation "$$2x=4$$", $$x$$ is merely a variable, and the equation is meaningless without any further context. You can ask many different questions about that equation, such as what real $$x$$ satisfies it, or what is its graph in the (cartesian) $$(x,y)$$-plane (it is a vertical line), or what are the free variables in it (just $$x$$), and so on. Furthermore, that equation may be just one part of a larger expression such as "$$∀x∈\mathbb{R}\ ( 2x = 4 ∨ ∃y∈\mathbb{R}\ ( (x-2)·y = 1 ) )$$", in which certainly $$x$$ is not only "the value or values that makes the equation true".

"$$2x=4$$" is an equation, but equations do not imply anything about the symbols in them. "What real $$x$$ satisfies the equation $$2x=4$$?" is a question with a well-defined answer. If you do not specify "real", then it is not only not a well-defined question, but also a common example of imprecision. Namely, "Solve $$2x=4$$." is not a precise question.

An equation is a (mathematical) statement of the form "$$A = B$$" where $$A,B$$ are terms (also called expressions). A statement has a truth-value once all its free variables have been bound (i.e. their values are specified). Namely, "$$2x=4$$" has a truth-value once you specify what $$x$$ is. Hence it is meaningful to ask what real $$x$$ satisfies that equation (i.e. what value[s] for $$x$$ makes that equation true).

"$$2x$$" and "$$4$$" are simply terms, and "$$2x$$" is a compound term built from the terms "$$2$$" and "$$x$$", where multiplication has been represented by juxtaposition. Yes, every variable is also a term, and as with statements, terms are meaningless until you specify the values of all its free variables.

So the $$x$$ in "$$2x$$" and "$$2x=4$$" are actually exactly the same kind of variable, and mean exactly the same thing. Just as you can ask a question about the equation "$$2x=4$$" (e.g. what real $$x$$ satisfies it?), you can likewise ask a question about the term "$$2x$$" (e.g. what real $$x$$ makes it equal to $$4$$?). No difference.

• I'd have to disagree: the $x$ in $2x$ could be the default name for the input to a function $f(x)=2x$... Sure, all these things are related, but they are not quite the same. – paul garrett Jun 22 '19 at 22:22
• Well, yes, I agree that it is possible to make arguments that "they are the same", as well as make arguments that "they are different". Debate team and all that. But a more sincere answer, including not only denotation but connotation, and intelligible to "intellectually naive/honest" students, is that they are subtly different, I think. After all, what kind of "x" is it that allows itself to be replaced by a matrix, in the Cayley-Hamilton theorem? – paul garrett Jun 23 '19 at 15:27
• @paulgarrett: I have an answer to that question, if you are interested, but it is in my opinion unrelated to this question. You can find me in this chat-room. – user21820 Jun 23 '19 at 15:31

With older students (university age, or maybe late school) I'd be inclined to try and show them that they probably don't really know what they are asking, rather than actually trying to give a definitive answer (which is much harder to do properly).

Write $$y-2x=3$$ next to a pair of axes. Write it again separately with $$y+x=1$$ underneath. Now ask if the $$x$$s are the same.

I would expect most students to think of the first instance as a line to plot, while the second is some equations to solve. While these are in some sense the same, I think a student who asks the opening question probably means these to be considered as different. Using the same equation in both cases helps to show that the issue isn't so much adding $$=4$$ to $$2x$$ as how you choose to think about it.

Telling the students to interpret the equals sign as asking a question is great, so long as they understand in which contexts they should think of it that way and when they should think of it a different way. (That students generally don't know this is, I think, probably one of the big reasons they find maths confusing.)

• Does the downvoter want to explain what's wrong with this as an answer? – Jessica B Jun 18 '19 at 6:18
• Oh, I see now that it was meant to be a system of two equations to solve... Maybe the same point can be made by writing once $y-2x=3$ and then something like $5-2x=3$. – Michael Bächtold Jun 18 '19 at 7:14
• I don't quite understand that: Solving a system of two linear equations with two variables is ok, while a solving a single linear equation with one unknown would confuse students. – Michael Bächtold Jun 18 '19 at 16:09
• @MichaelBächtold Don't expect the students to think. They solve the two using a fixed algorithm. Using it with only one variable in one equation requires modification of the algorithm. – Jessica B Jun 18 '19 at 17:08
• "Don't expect the students to think. They solve the two using a fixed algorithm." — Who taught them this fixed algorithm? Who taught them not to think? Rhetorical questions. – Rusty Core Jun 19 '19 at 5:46