Are Variables Always Variable?

In summary, x is a variable in all cases and can take on any value, but it can also be treated as a constant in certain cases where it is unbound. Variable names are not important and can be changed without affecting the function. The difference between a variable and a constant depends on the binding form and scope of the expression it is used in.']
  • #1
tgt
522
2
Suppose you are given the statement

'there exists x in the real numbers such that x^2-2=0'

Would you say the x is a variable or a constant?

There are two solutions for x so in this case x is a variable?

But what if you're given

'there exists x in the real numbers such that x-2=0'

There is only one solution, x=2. Would you say x is a variable or a constant?

What happens if it's the statement
'there exists (x,y) in the real numbers such that x^2+y^2=0'?
Are x and y treated as variables or constant? It seems variables is the more likely answer.

In all cases, x does seem to act like variables because they could be any real number with the condition that they satisfy the equation.
 
Last edited:
Mathematics news on Phys.org
  • #2
Roughly speaking, a "variable" is any symbol, represnting something that might conceivably change- even if it turns out to have a specific value. "x" is a variable in that it might take on any value. Of course, once we write "x- 2= 0", we have restricted it to a single value. In that case, I would say it is a number (as opposed to representing a number which it did in any case) but I would not say that x is a constant- later I might lift that restriction and require it satisfy some other condition.
 
  • #3
A very interesting question! This is something I think should be taught somewhere in mathematics, but sadly, you just have to pick up on it yourself.

Variables are funny things. They have names (x, y, z) and sometimes, we specify their type as well (integer, real, continuous function)... but variables also have two other properties: a binding form and a scope.

A binding form is a mathematical construct or syntax which creates the variable. We use many in mathematics. Here are the ones you are most familiar with:

* Function definitions:
[tex]f(x) = x^2 - 1[/tex]... the variable x is created by a function definition

* Summation:
[tex]\Sigma_{i=0}^{\infty}\frac{1}{2^n}[/tex]... the variable i is created by the sigma

* Integrals:
[tex]\int e^x dx[/tex]... the variable x is created by the integral.

*"Let" statements:
Let [tex]\pi[/tex] be the ratio of the circumference of a circle to its diameter. Then, the area of a circle is [tex]\pi r^2[/tex]... introduces [tex]\pi[/tex]

* Logical quantifiers:
[tex]\forall x: \exists y: x + y = 0[/tex]... create the variables x and y

* Setbuilder notation:
[tex]\{x | \sqrt{x} \in \mathbb{Z}, x \in \mathbb{Z} \}[/tex]... creates x

Variables can only live for so long. In the summation example, the variable i ceases to exist outside of the expression being summed over. In the case of the logical quantifier, we have two variables with a nested scope. x exists for all of "[tex]\exists y: x + y = 0[/tex]" and y, which is defined deeper in the expression only exists for "[tex]x + y = 0[/tex]".

Variable names are also unimportant. You can just as easily define [tex]f(x) = x^2 - 1[/tex] as [tex]f(y) = y^2 - 1[/tex] and you end up with the same function. (Of course, you have to be careful about doing silly things, like [tex]f(f) = f^2 - 1[/tex]... we'll ignore those cases for now).

So back to your question. What is the difference between a variable and a constant? The answer is: it depends. You must first choose an expression you wish to analyze. Let's take the quantifier example to start with:

[tex]\forall x: \exists y: x + y = 0[/tex]

In this expression, both x and y are each "bound" by their own personal binding form. In this case, we call them variables. They don't have a definite value at this point.

But consider this subexpression:

[tex]\exists y: x + y = 0[/tex]

From this point of view, we can no longer "see" the binding form for x. We say x is unbound. An unbound variable is the same as a constant. We can treat x as if it has a definite, unchanging value.

I want to offer an example in calculus, but it's a little difficult to do using standard mathematics notation. But this technique is well-developed in computer science, namely, in Lambda Calculus.
 
  • #4
Tac-Tics said:
A very interesting question! This is something I think should be taught somewhere in mathematics, but sadly, you just have to pick up on it yourself.

Variables are funny things. They have names (x, y, z) and sometimes, we specify their type as well (integer, real, continuous function)... but variables also have two other properties: a binding form and a scope.

A binding form is a mathematical construct or syntax which creates the variable. We use many in mathematics. Here are the ones you are most familiar with:

* Function definitions:
[tex]f(x) = x^2 - 1[/tex]... the variable x is created by a function definition

* Summation:
[tex]\Sigma_{i=0}^{\infty}\frac{1}{2^n}[/tex]... the variable i is created by the sigma

* Integrals:
[tex]\int e^x dx[/tex]... the variable x is created by the integral.

*"Let" statements:
Let [tex]\pi[/tex] be the ratio of the circumference of a circle to its diameter. Then, the area of a circle is [tex]\pi r^2[/tex]... introduces [tex]\pi[/tex]

* Logical quantifiers:
[tex]\forall x: \exists y: x + y = 0[/tex]... create the variables x and y

* Setbuilder notation:
[tex]\{x | \sqrt{x} \in \mathbb{Z}, x \in \mathbb{Z} \}[/tex]... creates x

Variables can only live for so long. In the summation example, the variable i ceases to exist outside of the expression being summed over. In the case of the logical quantifier, we have two variables with a nested scope. x exists for all of "[tex]\exists y: x + y = 0[/tex]" and y, which is defined deeper in the expression only exists for "[tex]x + y = 0[/tex]".

Variable names are also unimportant. You can just as easily define [tex]f(x) = x^2 - 1[/tex] as [tex]f(y) = y^2 - 1[/tex] and you end up with the same function. (Of course, you have to be careful about doing silly things, like [tex]f(f) = f^2 - 1[/tex]... we'll ignore those cases for now).

So back to your question. What is the difference between a variable and a constant? The answer is: it depends. You must first choose an expression you wish to analyze. Let's take the quantifier example to start with:

[tex]\forall x: \exists y: x + y = 0[/tex]

In this expression, both x and y are each "bound" by their own personal binding form. In this case, we call them variables. They don't have a definite value at this point.

But consider this subexpression:

[tex]\exists y: x + y = 0[/tex]

From this point of view, we can no longer "see" the binding form for x. We say x is unbound. An unbound variable is the same as a constant. We can treat x as if it has a definite, unchanging value.

I want to offer an example in calculus, but it's a little difficult to do using standard mathematics notation. But this technique is well-developed in computer science, namely, in Lambda Calculus.

Do you take binding as being a quantifier? So unbounded means no quantifier exists?
 
  • #5
tgt said:
Do you take binding as being a quantifier? So unbounded means no quantifier exists?

Sorta =-)

Unbound means the quantifier binding the variable isn't within the expression you're looking at. Every variable has to come from somewhere (even if it's not explicit).

Taking that last line again, [tex]\exists y: x + y = 0[/tex]. The variable x has a quantifier. It's the [tex]\forall[/tex] in the statement just above it. But while the quantifier exists in the outer expression, it is not in the subexpression that we're interested in.

"Constant-ness" is relative to what expression you're investigating.
 
  • #6
Tac-Tics said:
Sorta =-)

Unbound means the quantifier binding the variable isn't within the expression you're looking at. Every variable has to come from somewhere (even if it's not explicit).

Taking that last line again, [tex]\exists y: x + y = 0[/tex]. The variable x has a quantifier. It's the [tex]\forall[/tex] in the statement just above it. But while the quantifier exists in the outer expression, it is not in the subexpression that we're interested in.

"Constant-ness" is relative to what expression you're investigating.

Did you just show that a variable can become a constant? If not then can it still happen?

What happens if you define a constant in any system? Then that constant was never once a variable? And will continue being a constant in all its sub systems.
 
Last edited:
  • #7
tgt said:
Did you just show that a variable can become a constant? If not then can it still happen?

It's just a relative property. Like a ball in free space. It could look to you like the ball is at rest or it could look to be in motion. It depends on your point of view.

With the question of whether or not a variable is constant, the difference is your point of view is defined by what expression you're looking at.

What happens if you define a constant in any system? Then that constant was never once a variable? And will continue being a constant in all its sub systems.

I'm not sure quite exactly what you mean, but it sounds like you're talking about what happens when you come across a term "let c be a constant." In this case, calling c a constant is redundant (you could have just as effectively called it a real number or whatever). "Let" is a binding form. In math textbooks, let-expressions are sometimes very large. When you say "let c be a real", it's not unusual for the variable c to exist until the end of the chapter. If it does, then for all theorems or problems that c is used in, c is constant with respect to that theorem or problem.
 
  • #8
Maybe a "constant" could be defined as a "fixed value represented by a symbol" - perhaps what people also spontaneously think? So in formula circle area = PI x r ^2, "PI" is a constant but in expression circle area = 3.141592... x r ^2, "3.141592..." is not a constant
but a specific value. Like exponent "2" is not a constant but a value in the expression.

Of course my point of view is trivial and doesn´t imply something new. :shy:
 
  • #9
Strictly speaking, one should only use the word "variable" in talking about functions, not equations. It is better to refer to the "x" in x2= 2 as an "unknown number", not a variable. The "x" in f(x)= x2 is a variable.
 
  • #10
M Grandin said:
Maybe a "constant" could be defined as a "fixed value represented by a symbol" - perhaps what people also spontaneously think? So in formula circle area = PI x r ^2, "PI" is a constant but in expression circle area = 3.141592... x r ^2, "3.141592..." is not a constant
but a specific value. Like exponent "2" is not a constant but a value in the expression.

Of course my point of view is trivial and doesn´t imply something new. :shy:

But if equal things are equal, shouldn't 3.14159... be a constant whenever [tex]\pi[/tex] is?

HallsofIvy said:
Strictly speaking, one should only use the word "variable" in talking about functions, not equations. It is better to refer to the "x" in x2= 2 as an "unknown number", not a variable. The "x" in f(x)= x2 is a variable.

They are very much variables even in equations! A variable which parametrizes a function is often called a parameter, of course. But it seems silly to say that the 'x' in [tex]\exists x: x^2 - 4x + 1 = 0[/tex] is *not* a variable while the 'x' in [tex]f(x) = x^2 - 4x + 1[/tex] is.
 
  • #11
Tac-Tics said:
But if equal things are equal, shouldn't 3.14159... be a constant whenever [tex]\pi[/tex] is?

No, I mean "PI" is the label of a constant, while "3.141592..." is a numerical (proximity or exact) value of that constant. The constant symbol represents a theoretically correct value, while the evaluated numerical value may not be exactly true. At least this is my own
non-professional point of view. :cool:
 
  • #12
M Grandin said:
No, I mean "PI" is the label of a constant, while "3.141592..." is a numerical (proximity or exact) value of that constant. The constant symbol represents a theoretically correct value, while the evaluated numerical value may not be exactly true. At least this is my own
non-professional point of view. :cool:

But if one were to call such a thing a constant, it would not be a constant in the same sense as used in calculus. When we say that [tex]\frac{d}{dx}(au) = a \frac{d}{dx}(u)[/tex] whenever a is a constant.

One more note about the definition of constant I use above that is somewhat implicit. When you have two bound variables in an expression, the "inner" variable (the one bound in the inner-most expression) can take on a value in terms of the outer one.

To illustrate this, in analysis, we often see proofs that follow an [tex]\epsilon - \delta[/tex] form. The trick with these is to find a value of [tex]\delta[/tex] in terms of [tex]\epsilon[/tex] to satisfy a logical statement such as
[tex]\forall \epsilon: \exists \delta: \forall y: |x - y| < \epsilon => |f(x) - f(y)| < \delta[/tex]

(In this case, proving continuity of f at a point x. Also, note that f and x are constants in this statement!)

The reason we can define [tex]\delta[/tex] in terms of [tex]\epsilon[/tex] is because within the scope of [tex]\delta[/tex], [tex]\epsilon[/tex] is a constant.
 
  • #13
Tac-Tics said:
But if one were to call such a thing a constant, it would not be a constant in the same sense as used in calculus. When we say that [tex]\frac{d}{dx}(au) = a \frac{d}{dx}(u)[/tex] whenever a is a constant.

Thanks for further interesting comments, Tac-Tics !

Regarding your first derivation rule containing "constant a", I may say that "a" fulfills
my definition of a constant: 1) It is represented by a symbol. 2) It is exactly defined
(as being whatever), and cannot even be replaced by a specific generally yelding value.
So you must stay with your symbol "a" as a not numerically specified value.

Regarding the later part of your post I may return later, when I have studied it closer.

:redface:
 
  • #14
Tac-Tics said:
But if equal things are equal, shouldn't 3.14159... be a constant whenever [tex]\pi[/tex] is?



They are very much variables even in equations! A variable which parametrizes a function is often called a parameter, of course. But it seems silly to say that the 'x' in [tex]\exists x: x^2 - 4x + 1 = 0[/tex] is *not* a variable while the 'x' in [tex]f(x) = x^2 - 4x + 1[/tex] is.
Hmm. Well, that's a little better. The "x" in [itex]x^2- 4x+ 1= 0[/itex] can be either [itex]2+ \sqrt{3}[/itex] or [itex]2- \sqrt{3}[/itex] so it can vary a little! Not as much as the x in [itex]f(x)= x^2- 4x+ 1[/itex] which can be any real number (or any complex number if the domain of your function is the complex numbers).
 
  • #15
HallsofIvy said:
Hmm. Well, that's a little better. The "x" in [itex]x^2- 4x+ 1= 0[/ite] can be either [itex]2+ \sqrt{3}[/itex] or [itex]2- \sqrt{3}[/itex] so it can vary a little! Not as much as the x in
f(x)= x^2- 4x+ 1[/itex] which can be any real number (or any complex number if the domain of your function is the complex numbers).

Isn't it peculiar that there are variables that don't vary? =-)

One of the nicest properties of variables is that the name of a bounded variable (or were we calling them "variable variables"? I forget...) anyway, the name of bounded variables can be changed at whim. f(x) = x means the same as f(y) = y.

Similarly, if we want to call variables by a different name, that's totally fine, as long as we are still defining them the same way. Perhaps we can use "unknown" as you suggested before, or else we might want to make up a new name, like "symbol" or something more descriptive of what they do, such as a "denotation".

Variable is just one name that's used in math, and the one used in predicate calculus and computer science where this theory comes from.
 

1. What is a variable?

A variable is a quantity or value that can change or vary in a given situation or experiment. It is usually represented by a letter or symbol and is used to express a relationship or equation.

2. What is a constant?

A constant is a quantity or value that remains the same throughout a given situation or experiment. It is usually represented by a specific number or value and is used to provide a baseline or comparison.

3. What is the difference between a variable and a constant?

The main difference between a variable and a constant is that a variable can change or vary, while a constant remains the same. Variables are used to represent changing quantities or values, whereas constants are used to provide a baseline or comparison.

4. How are variables and constants used in scientific experiments?

Variables and constants are used to control and measure different factors in scientific experiments. Variables are changed or manipulated to see their effect on an outcome, while constants are kept the same to provide a baseline for comparison.

5. Can a variable also be a constant?

Yes, a variable can also be a constant in certain situations. For example, in a scientific experiment, a variable can be kept constant while other variables are changed. In this case, the constant variable serves as a reference point or control for the experiment.

Similar threads

Replies
3
Views
704
Replies
2
Views
1K
Replies
2
Views
247
  • General Math
Replies
21
Views
4K
Replies
2
Views
746
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
447
Replies
16
Views
1K
  • General Math
Replies
1
Views
846
  • General Math
Replies
7
Views
1K
Back
Top