# Can Relations Have Only One Variable?

Are equations with only one variable such as:

$$x = x^2$$

and

$$x = 5$$

considered relations? Do they have domains and codomains?

• I've never heard of an equation being a relation, of itself. On the other hand "=" is a relation. Relations are subsets of $A\times B$ for some sets $A,B$. What sets do you think are at play here? – rschwieb May 31 '19 at 15:18
• Another possibility is to view $x\mapsto x^2$ or $x\mapsto 5$ as functional relations, but that does not seem to be what you're getting at. Can you clarify? – rschwieb May 31 '19 at 15:20
• @rschwieb, I guess the question is about the difference between a function and a relation, and whether a function is considered a subset of the definition of a relation. For example, x=5 is a function, and is a relation in the same time between all the numbers in R and the set {5}. – NoChance May 31 '19 at 15:27
• @NoChance In what sense is $x=5$ a function? Are you referring to what I said about the function $x\mapsto 5$ possibly? As if it was supposed to be "$f(x)=5$" – rschwieb May 31 '19 at 16:26
• @rschwieb, yes, I see that f(x)=5 is a function. Each domain entry has 1 image in the range. – NoChance May 31 '19 at 21:19

Longer answer. A relation is a set of pairs of things. The set where you can find the first elements of the pair is the domain, the second the codomain. Without the "pair" you can't make sense of that.

Although "domain" and "codomain" make sense for any relation, they are most commonly used for relations that happen to be functions.

Thinking about "variables" in equations is not a good way to understand this material. The language of sets is better.

• I think I understand what relations are, I’m just not sure I understand which types of “things” have domains and codomains and how to recognize them. I believe functions, relations and expressions all have domains and codomains. Is the equation x = x^2 any of those things? I don’t believe it’s not a function or expression. If it’s not a relation either, does that mean it has no domain or codomain? – Frasch May 31 '19 at 15:50
• Relations are the things that have domains and codomains. Functions are a special kind of relation - only there do you usually see domains and codomains discussed. Moreover, although formally a function is a relation we don't usually write it as a set of ordered pairs (unless we are explicitly thinking about its graph). Expressions and equations are not relations.. – Ethan Bolker May 31 '19 at 16:03
• If equations and expressions don’t have domains, how should we interpret the variables? To have an equation like x = x^2, do we not need to know what values x allows? – Frasch May 31 '19 at 16:54
• I think you are focusing too much on vocabulary without specifying context. Ur;s the context that usually tells you what the :variables" mean. This may help: math.stackexchange.com/questions/2738360/… – Ethan Bolker May 31 '19 at 17:14
• Do you mean that the context let’s us know what values are allowed for the variables, even when an equation is not a relation? – Frasch Jun 1 '19 at 1:47

An equation is not a set, it is a sentence ( an open sentence) so it cannot be, as such, a relation, for a relation is a set.

Now, an equation can "define" a relation.

Although a relation is a set of pairs (x,y) you do not need an equation in two variables to define a relation.

Define in the cartesian plane the following relation

D = { (x,y) | x = 10 }.

Any point ( pair (x,y) ) with x=10 belongs to this relation, whatever y may be.

this relation is simply the vertical line that intersects perpendicularily the X axis at point ( 10,0) .

This relation is from R to R. It is a subset of the cartesian product : R cross R.

The domain of this relation is R ( set of real numbers)

The codomain is {10} the singleton having 10 as unique element.

Indeed, codomain of the relation D = the set of all y belonging to R such that for some x belonging to R , xDy is true.

The number 10 is the only number that satisfies this condition ( for our relation D)

Abusively, one can sometimes read things such as

" the line : x = 4 "

or " the line : y= -6".

A more rigorous way of speaking would be : "the line defined by the equation : x = 4" , or " the line defined by the equation : y = - 6 ".

A straight line ( in the cartesian plane) is a relation ( or "represents a relation") , that is, it is a set of points (x,y) all belonging to the cartesian product of R by itself, R being the set of real numbers). So it is a subset of "R cross R" ( cartesian product ...)

Now what is this ( informally defined) relation x = x² ?

It is the set of all points (x,y) such that x= x².

That is the set { (x,y) | x = x² }

Note that here, no condition is imposed on the y-coordinate. It is only on the x-cordinate that a condition is imposed.

Lets decipher this condition by solving the equation for x

• If x = x²

• Then : x² = x

• Then : x²-x = O

• Then : x(x-1) = O

• Then : x = 0 OR x = 1

Let's check.

(1) if x= 0, then x²=0=x --> OK

(2) If x = 1 , then x²=1² = 1=x --> OK

The set of all points (x,y) such that x= 0 is simply the Y axis of the cartesian plane.

The set of all points (x,y) such that x = 1 is vertical line that intersects perpendicularly the X axis at point ( 1, 0). indeed, all points of this line have an X-cordinate of 1 ( whatever their Y-cordinate may be).

The set that is defined by the equation is : x = x² is the set of all points (x,y) such that : x = 0 OR x =1.

This set is not a line, it is the set of all points that belong either to one line, or to the other. It is the UNION of these two line-sets ( so to say).

The case : x = 5 is easier.

Try to find which set it defines. It is the set of all points (x,y) such that ...

This set is a line.

Try to find which one and to draw it.

A last question : what is the relation defined by the equation : y = O ?

And by the equation : y = - 10?

• Is this always the case when we write something like x = 5? Can an equation like x = 5 be meaningfully written without an implicit y variable? – Frasch May 31 '19 at 16:38
• @Frasch. When you do ordinary algebra ( for example to solve word problems) equations are not supposed to have any link with relations. In this context, there is no " implicit" y variable. It is in coordinate geometry ( analytic geometry) that an equation will be considered informally as defining a relation ( a subset of the cartesian plane). In this context you will read things such as " the equation of a circle, the equation of an ellipse, of a line, etc). – Saint James May 31 '19 at 16:43