# Connexions

You are here: Home » Content » 01 Function Concepts -- What is a Variable?

### Recently Viewed

This feature requires Javascript to be enabled.

### Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

# 01 Function Concepts -- What is a Variable?

Module by: Kenny M. Felder. E-mail the author

Note: You are viewing an old version of this document. The latest version is available here.

A variable is a letter that stands for a number you don’t know, or a number that can change.

A few examples:

## Example 1: Good Examples of Variable Definitions

• “Let p p be the number of people in a classroom.”
• “Let A A be John’s age, measured in years.”
• “Let h h be the number of hours that Susan has been working.”

In each case, the letter stands for a very specific number. However, we use a letter instead of a number because we don’t know the specific number. In the first example above, different classrooms will have different numbers of people (so p can be different numbers in different classes); in the second example, John’s age is a specific and well-defined number, but we don’t know what it is (at least not yet); and in the third example, h will actually change its value every hour. In all three cases, we have a good reason for using a letter: it represents a number, but we cannot use a specific number such as “–3” or “ 4 1 2 4 1 2 ”.

## Example 2: Bad Examples of Variable Definitions

• “Let n n be the nickels.”
• “Let M M be the number of minutes in an hour.”

The first error is by far the most common. Remember that a variable always stands for a number. “The nickels” are not a number. Better definitions would be: “Let n n be the number of nickels” or “Let n n be the total value of the nickels, measured in cents” or “Let n n be the total mass of the nickels, measured in grams.”

The second example is better, because “number of minutes in an hour” is a number. But there is no reason to call it “The Mysterious Mr. M” because we already know what it is. Why use a letter when you just mean “60”?

Bad variable definitions are one of the most common reasons that students get stuck on word problems—or get the wrong answer. The first type of error illustrated above leads to variable confusion: n will end up being used for “number of nickels” in one equation and “total value of the nickels” in another, and you end up with the wrong answer. The second type of error is more harmless—it won’t lead to wrong answers—but it won’t help either. It usually indicates that the student is asking the wrong question (“What can I assign a variable to?”) instead of the right question (“What numbers do I need to know?”)

## Variables aren’t all called x. Get used to it.

Many students expect all variables to be named x x , with possibly an occasional guest appearance by y y . In fact, variables can be named with any practically any letter. Uppercase letters, lowercase letters, and even Greek letters are commonly used for variable names. Hence, a problem might start with “Let H H be the home team’s score and V V be the visiting team’s score.”

If you attempt to call both of these variables x x , it just won’t work. You could in principle call one of them x x and the other y y , but that would make it more difficult to remember which variable goes with which team. It is important to become comfortable using a wide range of letters. (I do, however, recommend avoiding the letter o whenever possible, since it looks like the number 0.)

## Content actions

### Give feedback:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks