# Constants and variables (the very basics)

1. Oct 2, 2015

### Cliff Hanley

Variable;

A symbol for a number we don't know yet. It is usually a letter like x or y.

Example: in x + 2 = 6, x is the variable.

[mathsisfun.com]

Q. Why is it called the variable? This seems to me to imply that its value varies. In the above example it seems to me to simply be the unknown term, not one that varies (x in the above example = 4, without any variance). Wouldn’t ‘unknown term’ be a more helpful label?

*

constant

1. A component of a relationship between variables that does not change its value, e.g. in y = ax + ...

[Oxford dictionary of physics]

Q. Is the c squared (9 x 10^16 m/s, or 90 quadrillion m/s) in E = mc^2 the constant (and E and m the variables)?

Q. Is the g (10 m/s^2) in w = mg the constant (and w and m the variables)?

If so, then I can see here why 'variable' is a helpful label as E and M vary according to the various examples of situations involving such phenomena [as does w and m]; but it doesn’t to me seem helpful when applied to the example of x + 2 = 6 (where the x, although unknown, does not vary; it’s always 4).
Is 'variable' then a helpful term in physics but less so in maths?

2. Oct 2, 2015

### nuuskur

x+2=6, x is a variable. We can vary its value, but there is only one value that satisfies the equality.
x+2 is the image of the variable x in this example.

w = mg is another function. m is the variable, w is the image of the variable m defined by the function $f(m) =w= gm$. g is constant, one can argue that it changes ever so slightly in comparison to various locations, but overall it's still a fixed value for every planet, for Earth g = 9.81 m/s²

3. Oct 2, 2015

### symbolipoint

Variable, a letter to represent a number which can change, and is often solved to find a value. It can be expected to change in value.

Constant, a letter to represent a number OR a plainly used numeric value, usually NOT expected to be changeable in value.

Situations and ones intuition about them tell one if a variable is a constant or not a constant.

4. Oct 2, 2015

### jbriggs444

The writer can use hints to help guide the reader to the intended interpretation.

The variable name is a clue. x, y, z and w are most often used as variables. k, c, a and b are most often used as constants. (And i, j and k as integer-valued indices).

Solved equations are preferentially written with the calculated result on the left and the independent variables from which that result is calculated on the right, e.g. $x = \frac{1}{2}at^2$

If you are a computer programmer, comparison tests in if-then-else statements should adhere to this same convention. The value which you consider to be variable should be on the left and the more or less fixed expression against which you are testing should be on the right of the comparison operator. e.g. "if ( temperature >= critical_value - safety_margin ) then ..."

Individual terms in expressions are preferentially written with the constant first and the variables after $ax^2 + bx + c = 0$

These rules are not carved in stone, e.g. $PV=nRT$

5. Oct 4, 2015

### Cliff Hanley

Nuuskur, you said,

“x+2=6, x is a variable. We can vary its value, but there is only one value that satisfies the equality.”

Q. Wouldn’t varying x’s value make what was an equation no longer an equation (eg, by changing it from 4 to 5 would give us 7=6 when 7 does not equal 6)?

You seemed to have preempted this by adding that, 'there’s only one value that satisfies the equality’; that sounds to me like saying, ‘we can vary its value but that will screw up the equation.'

You also said,

“x+2 is the image of the variable x in this example.”

Q. Can you explain what ‘image of the variable’ means with language suitable for a maths novice?

You said,

“w = mg is another function.”

Q. What does function mean? I looked it up and got, ‘relation between a set of inputs and a set of permissable outputs’ but that made little sense to me at this stage of my learning.

“m is the variable (re w=mg)…”

Q. Why isn’t w also a variable given that it’s value varies (just like m) according to the example in question?

6. Oct 4, 2015

### nuuskur

A function is a relation between two sets of objects, to put in rough terms. A function is something that determines the correspondence between an element from one set and an element from the other.
We say sets A and B are the origin and the image respectively if our function sets an element in A in correspondence with an element b in set B. The only rule a function must obey, no element from set A can correspond to two different elements in B at the same time.

Simple example
You can view a lecture room full of students. The chairs represent our set B, the image. The students represent our set A, the origin. Once the students all take a seat, there is a correspondence between the chairs and the people. The only rule is, no student can sit on two chairs at the same time, but some chairs can be empty, two or more people can sit on the same chair.

You can regard the Sun casting a shadow of an object as a function. Each object has A shadow. No object can cast two or more shadows at the exact same time (with the Sun as our only source of light that is)

$x+2=6$, well right now we have that $x=4$. It can be viewed as a function, but it's a bad example to illustrate it. For the sake of simplicity you can just look at it and say $x=4$ and that's all she wrote. A variable can also be regarded as an unknown.
You can also look at the problem as $x+2=y$. Given a value $y$, determine what value $x$ satisfies the equality. Then we say $x$ is an original and $x+2$ is the image corresponding to the original $x$.

$w=mg$. This is a function. By varying the value $m$, $mg$ gives us a unique value $w$ for every unique $m$. In this case, $m$ is a variable, something that is varied, and $w$ is the image of the original (variable) $m$ given with the relation $w = mg$, where $g$ is constant. We can also write $m = \frac{w}{g}$ and we can declare it to be a function of $w$ with $m$ as its image.

We say the image is dependant on the variable(s). The image is not a variable, its value is declared when we declare the value of the variable(s). Given our examples, can we change a shadow that is cast without any object that would cast the shadow, can we determine/re-arrange who is sitting on any chair if there are no chairs in the classroom?

Last edited: Oct 4, 2015