You are on page 1of 16

Econ 107b. Unit 2.

Functions and Relations.


Contents. Unit 2. Introduction. Ordered Pairs. Functions. Introduction. Images and Pre-Images. The Range. Example of Function Terminology. Cartesian Products (Set Products). n-Dimensional Space n Economic Functions of Two or More Variables Relations on a Set. Preferences. Relations on Two Sets. Unit 2 Essentials. Unit 2 Exercises. Unit 2 Answers. Unit 2 EndNotes. Introduction. In Units 3-8 we will arrive at a good understanding of vectors and matrices. These are a basic tool of economics and finance, since they allow us to deal with many interacting variables in a clear, efficient, and systematic way. Our understanding of matrices relies heavily on their interpretation as a notation for a particular type of mathematical function. It is therefore well worth us taking the time to understand as clearly as possible just what a function is, and to master the associated terminology. Thats what we do in the first part of this Unit. A starting point for understanding a function is that it maps elements in one set, known as its domain, to elements in another set, known as its codomain. In the case of matrices, we can understand this idea geometrically. For instance a 3x2 matrix maps points in 2-dimensional space (called, for reasons we shall discuss, 2 ) to points in 3dimensional space ( 3 ). In the middle of this Unit we explain the notations 2 , 3 . Another preoccupation of economics is preference: preferring one thing to another, or being indifferent between them. Since similar ideas are used to explain both functions and relations, now is a good moment to introduce the latter. Correspondingly the last

Econ 107b Unit 2

-1-

RWB

part of the Unit deals with relations. Although Units 1 and 2 consist almost entirely of definitions, the definitions themselves are the outcome of the (successful) attempts of some very clever people to clarify concepts that had previously caused a lot of difficulty. The best example of all is Freges quantifier concept in Unit 1, which led to revolutions in logic, philosophy, and mathematics. But the Dirichlet approach to function (in this Unit) also resolved much confusion. Ordered Pairs. Suppose that the set S = {a , b} . Then as we noted in Unit 1, we also have S = {b, a} . The order in which the elements of the set S are listed is irrelevant. Sometimes, though, it is useful to keep the elements in a particular order (for instance, it is useful to do this with the two co-ordinates of a map reference, or with the quantities on a consumers shopping list, as in 107a U5). For this we use the special notation (a , b) , read as the ordered pair a,b. Unless a = b , we have (a, b) (b, a ) . (EndNote1. EndNote2.) Functions. Introduction. All the work so far is useful in its own right. But the specific reason for putting it at the start of a set of lectures about matrices is that it allows us to discuss functions intelligibly. And once we know about functions, we can understand the properties of matrices. Let A, B be two sets. Then a method of pairing up every element of A with some element of B is called a function from A to B , written f :AB read as f maps A to B , or f is a function from A to B . (EndNote3.) We use f as our usual symbol for a function, reserving the letters g , h etc. for if we have to deal with more than one function at a time. Important terminology. The set A is called the domain of f ; the set B is called the codomain (a less popular term is target space). Think of the domain as the from set, the codomain as the to set. The essential feature of a function is that: every element of the domain is mapped to exactly one element of the codomain. Example 1. A = {1,2,3}, B = {1,2,3,4,5,6,7,8,9,10} . The following defines a function: f (1) = 2, f (2) = 5, f (3) = 10 . Domain elements appear on the left, inside brackets; codomain elements

Econ 107b Unit 2

-2-

RWB

appear on the right. The function could also be defined by f ( x) = x 2 + 1 or as a set of 3 ordered pairs: f = {(1,2), (2,5), (3,10)} , or (since in this case A and B both have numerical values) by a graph showing x on the horizontal axis and f ( x ) on the vertical axis. Example 2. W={Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}, B={5,6,7,8,9,10} x {1,2,3}

f :W B
f(Sunday)=6, f(Monday)=6, f(Tuesday)=7, f(Wednesday)=9, f(Thursday)=8, f(Friday)=6,f(Saturday)=8 (each day being mapped to the number of letters in its English name). Again, we could define the function as a set of ordered pairs. However in this case a graph is not possible, since the domain does not take numerical values. Example 3. Recall from Unit 1 that is the set of real numbers, i.e. numbers that can be written as decimal fractions (possibly with an infinite number of decimal places), such as 1.0, 0.0, -123.45,

2 = 1.4142135623730950488 ,

= 3.141592653589793238462643 ,
all of which can be represented by points on a continuous line. Most functions you are familiar with have domain and codomain both equal to , for example:

f : f : f :

f ( x ) = cos x f ( x ) = exp x f ( x) = 10 x 2 3 x + 2

Example 4. The logarithm function does not have domain , since log x does not exist when x 0 . A suitable domain is + , i.e. the set {x : x > 0}. Thus log : + . Example 5. The Profit Function. Suppose that profit depends on a single variable Q , interpreted as the number of cars produced. Although profit expressed in dollars is a multiple of 0.01, and the number of cars must be an integer, it is convenient to pretend that both quantities vary smoothly. However the number of cars produced cannot be negative, so we have

Econ 107b Unit 2

-3-

RWB

: (+ ) .

Usually profit, like most economic variables, depends on several other quantities. We shall see how to deal with functions of two or more variables later in this Unit. Example 6. We need to be very careful when discussing the so-called squareroot function, which gives rise to two problems. (i) Since negative numbers do not have square roots, is not a suitable domain. Get round this problem by restricting the domain to be (+ ) , i.e. (ii) Positive numbers have two square roots, e.g. 4 = 2 . Again, this disqualifies them from being functions, which are always single-valued. One solution is to restrict the codomain to (+ ) . Thus

the set {x : x 0} .

: (+ ) (+)

Example 7. A = {a , b, c, d , e}, B = { p, q , r , s} .The five elements of A are distinct, and the four elements of B are distinct. Define f : A B by

f (a ) = p; f (b) = s; f (c) = p; f ( d ) = r; f ( e) = s .
Yet another way to think of functions is by the following type of diagram: Domain (A) a b c d e Note that if a function is represented in this way: (i) every element of the domain must be at the foot of exactly one arrow, but (ii) on the other hand an element of the codomain can be at the head of 0,1,2, or indeed any number of arrows. The official definition of function is based on the idea of ordered pairs. It is given in the EndNotes4 (which however you should not read until the later sections on relations have been mastered). Codomain(B) p q r s

Econ 107b Unit 2

-4-

RWB

Images and Pre-Images. One picturesque and useful way of thinking about functions is that they cause elements of the domain to cast a shadow in the codomain. But instead of shadow, its usual to use the term image. Example 2 (continued). Since f (Monday ) = 6 , the image of Monday under the number of letters function is 6. But the image idea can also be applied to sets of more than one element. Take a subset of the domain, say S = {Sunday, Monday, Tuesday} . Then the image of S under f is the set { f (Sunday ), f ( Monday), f (Tuesday )} = {6,6,7} = {6,7} . Pre-images go in the reverse direction: given a shadow in the codomain, what are the objects in the domain which cast that shadow? The notation for this is f 1 . For instance,

f f
1

(6) = {Sunday, Monday, Friday} ;

({8,9}) = {Wednesday , Thursday , Saturday} ;


f
1

(10) = (the empty set)

The Range. A particularly important image set is the image of the domain, which is called the range. Suppose that f : S T , so that S is the domain, T the codomain. Then the range f ( S ) is the set of all elements in the codomain that are images (arrow-heads) of one or more elements of the domain. Note that this is a different meaning than the one which occurs in the range of a random variable. A useful way to think about the domain, codomain, and range is through the following fried-egg diagram:

CODOMAIN T

DOMAIN S

RANGE f (S )
f

Econ 107b Unit 2

-5-

RWB

So its always true that the range is a subset of the codomain. The codomain is an egg whose yolk is the range, and whose white consists of those elements of the codomain that arent arrowheads. In our weekday example, in which f : W {5,6,7,8,9,10} , the range is

range( f ) = {6,7,8,9} .
Example of Function Terminology. Think of the function

f ( x ) = cos x , x 0 ,
a portion of whose graph is shown below.
cos(x)

1.5 1 0.5 cos(x) 0 10.5 11.5 10 11 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 -0.5 -1 -1.5 x 9.5 12 0 1 2 3 4 5 6 7 8 9

The restriction x 0 chops off the negative real axis, and the domain is ( + ) . There is always some arbitrariness about the codomain, which we can think of as the set of potential values of f . We can choose any convenient set containing the range. Lets choose the codomain to be the set . At this point we can write:

f : (+) .

The range is the set of values actually assumed by f ,

range( f ) = [1,1] = { y : 1 y 1}
We note that the range [1,1] is a subset of the codomain . The image of 0 under f is 1 (= cos( 0)) .

Econ 107b Unit 2

-6-

RWB

The pre-image of 1 is the set of all elements x in the domain such that cos x = 1 . Thus f 1 (1) = {0,2 ,4 ,6 , } . No point in the domain has 2 as an image. Thus f
1

(2) = .

Cartesian Products. (Set Products.) Most functions of economic interest depend on more than one argument. Thus the production function F ( K , L) and the utility function U (Q1 , Q2 ) each have two arguments. This seems to cause a problem with defining the domain of such functions. What is it exactly that F and U depend on? We answer this by using ordered pairs to define a new set operation called the Cartesian product, which allow us to build up coordinate systems (hence the name Cartesian, after the Latin form of Descartes). Let

A = {Smith, Marx, Keynes}, B = {Wealth of Nations, Das Kapital} .


Then the cartesian product, or set product of A and B , written A B A cross B, is the set of all ordered pairs whose first element belongs to A and whose second element belongs to B . (EndNote5.) So in this case A B is a set with 6 elements, each of which is an ordered pair.

A B = {(Smith, Wealth of Nations), (Smith, Das Kapital), (Marx, Wealth of Nations), (Marx, Das Kapital), (Keynes, Wealth of Nations), (Keynes, Das Kapital)}
Ive deliberately started with a non-numerical example, to stress that in order to form the set product A B , it isnt necessary to be able to multiply elements of the two sets together. However if the elements of the two sets are integers or real numbers, things get more interesting, e.g. Example 8.

A = {2,3}, B = {1,2,3,4},
-

A B = {(2,1),(2,2),(2,3),(2,4),(3,1), (3,2), (3,3), (3,4)}

more interesting because we can now draw a picture of A B , given by the crosses in this diagram:

Econ 107b Unit 2

-7-

RWB

4 3 2 1 3

For the set A A , we introduce the notation A 2 , so we now know how to square a set. Example 9. If A = {2,3} , then A2 = {( 2 ,2 ),( 2 ,3),( 3,2 ),(3,3)} , a set of 4 elements. n-Dimensional Space n Theres one set like A 2 that were going to be using a lot. This is the set 2 , which is equal to : that is, the set of all ordered pairs ( x , y ) such that x and y : that is, the set of all pairs of real coordinates: that is the entire real plane. We already know that 1 (= ) is the set of points on a line. I hope you can convince yourself that 3 is a sensible notation for the set of all points in 3-dimensional space. This is as far as visualization will take most of us (EndNote6). Example 10. Suppose that there are 1000 goods, and that a particular consumer owns amount x1 of good 1 (measured in kg., say), x2 of good 2, ... x1000 of good 1000. Then this information can be stored as the ordered ntuple ( x1 , x2 , x1000 ) : a single point in 1000 (or perhaps 1000 ). (+ ) We cant visualize spaces of more than two or three dimensions. But we can gain an excellent understanding of matrices and vectors by becoming thoroughly familiar with 2 , the two-good case. This is the strategy we pursue over the next few Units. Economic Functions of two or more Variables We can now understand the domains of production functions or utility functions. Example 11. Suppose that F ( K , L) is a production function. Given any amounts of capital K 0 and L 0 , F ( K , L) is the quantity produced, which satisfies F ( K , L) 0 . The domain of F is the set of ordered pairs {( K , L) : K 0 & L 0} , i.e. the upper right-hand quadrant of the real plane, i.e. 2 ) . Likewise the output satisfies F ( K , L) ( + ) . So the (+

Econ 107b Unit 2

-8-

RWB

function may be written


F : (2+ ) ( + ) .

Example 12. Suppose that U is a utility function depending on 7 goods. Quantities of goods can never be negative, but U may be negative. Then the domain and codomain of U are given by the expression
U : 7+ ) (

Relations on a Set. Economics is largely about choices, and it is often assumed that choices are made on the basis of preferences. The mathematical language just developed is suitable for discussing certain aspects of preferences, because these are a certain type of relation. We start with an example of the more human form of relation. Example 13. Let X={Mr Elton, Augusta Hawkins, Mr Knightley, Mr Robert Martin, Harriet Smith, Emma Woodhouse}. The set X contains a subset of the characters who appear in Jane Austens masterpiece Emma. Certain characters admire other characters, and possibly even admire themselves. Simplifying to a certain extent (for the characters views change as the novel progresses), the admiration relationships can be summarized in the following table: Admiree Mr E Mr E AH Admirer Mr K RM HS EW 1 1 1 1 1 1 1 AH 1 1 1 1 1 1 1 Mr K RM HS EW 1

which shows for instance that Harriet Smith admires Mr Knightley, but Mr Knightley does not admire Augusta Hawkins. Any relation may be specified as a set of ordered pairs. Example 14. Since there are 15 1s in the table above, the admires relation may be specified extensively as a set of 15 ordered pairs:

{( MrE , MrE ), ( MrE , AH ), ( MrE , EW ), ( EW , MrK ), ( EW , EW )}


The same set may be specified by the intensive definition

{( x, y ) : ( x X ) & ( y X ) & ( x admires y )}

Econ 107b Unit 2

-9-

RWB

Note that this is a subset of the set X 2 = X X , which contains 36 elements. The table above shows little order. For instance, Mr Elton admires Emma Woodhouse, and Emma Woodhouse admires Mr Knightley, but Mr Elton does not admire Mr Knightley. We say that the admiring relationship is not transitive. Example 15 On the other hand we would expect the relation is poorer than to be transitive. If Mr Elton is poorer than Emma Woodhouse, and she is poorer than Mr Knightley, then we would expect to find that Mr Elton is poorer than Mr Knightley. Example 16 Consider the relation . Mathematically speaking, it consists of all ordered pairs of real numbers ( x, y ) which satisfy x y . This set is a subset of the real plane 2 , consisting of the diagonal line y = x and all points to the left of it.The relation is transitive. So are the relations <, , >, = , which can also be used to define subsets of 2 . The mathematical approach to a relation on a set X is that it is a subset of X 2 . This was mentioned explicitly in Examples 14 and 16. Preferences. We now look briefly at the relations in which economists are most interested, namely those that are to do with preference. We did not start our discussion of relations with preferences. This is because economists usually assume that preferences have many properties, such as transitivity, not enjoyed by relations in general. Let X = {a, b, c, d } be a set of objects, and write

xPy xIy

to mean to mean

I prefer x to y (strict preference) I am indifferent between x and y ; I value them equally.

xRy

to mean

I value x at least as highly as y (weak preference).

In practice, economic agents probably arrive at such preferences only when faced with choices. For instance, suppose that x is a months holiday in Bali, and y is a months holiday in Hawaii. I could not say that I prefer one to the other, or even that I am indifferent between them. When the choice arises, I will devote more thought to the matter. However economists usually simplify matters by assuming the contrary: that agents can always rank objects in order of preference, with ties being allowed. If this is the case, then we can make numerous deductions about the properties of P, I, and R. Example 17. (a) P, I, and R are all transitive.

Econ 107b Unit 2

- 10 -

RWB

(b) (c) (d) (e)

xPy ~ yPx [( xRy ) & ( yRx)] xIy ( xPy ) ( yPx ) ( xIy) ( xPy ) ~ ( yRx)

The abstract approach to preferences has been influential in two main areas: (1) In providing a rigorous mathematical basis for microeconomic theory, usually directed to the question: what are the minimum assumptions we need to make, in order for agents behaviour to be treated by the usual microeconomic methods; (2) In the Theory of Social Choice, where the preoccupation is to suggest what choices should be made by society as a whole, given the preferences of the agents of whom society consists. The best-known result is a negative one, discovered by K.Arrow in 1951, and known as the Arrow Impossibility Theorem: Suppose that ten agents face a set of choices X = {a, b, c, d } . Each agent arrives at their own ranking of the elements of X ; ties being allowed. Arrow asked, is it possible for this 10-person society to rank the elements of X on the basis of the individual rankings? He laid down 4 reasonable-sounding criteria that societys ranking should obey, for instance the Pareto criterion: If everyone prefers x to y , then society should also prefer x to y . The Impossibility Theorem showed that no method of ranking would satisfy all 4 criteria. The statement and proof of the theorem rely heavily on the abstract approach to preferences we have briefly introduced above. Relations on two Sets. In the examples of relations above, the objects being related to each other were always of a similar type. This is in fact the usual case with the economic relation of preference. But its sometimes useful to think of relations between two sets. Take the relation wrote (in the sense of authors writing books). The extensive version of wrote is the following set of ordered pairs:

{( x, y ) : ( x A) & ( y B) & ( x wrote y )} ,


where A = set of authors, B = set of books. Thus the relation wrote is a subset of A B , rather than of A A . Unit 2. Essentials. Are you now (having done the Quiz questions) completely familiar with the following terms? -

Econ 107b Unit 2

- 11 -

RWB

ordered pair Cartesian (set) product relation transitive relation preference relation

function domain codomain image range preimage

Unit 2. Exercises. Q2-1. Suppose that A = {1,2,3,4} , B = {1,2,3,4,5,6,7} , and that f : A B is a function defined by f ( x) = ( x 2) 2 + 1 . Find (a) (b) (c) (d) (e) Q2-2. the domain of f ; the codomain of f ; the range of f ; the image under f of the set {2,3} ; the pre-image under f of the set {2,3,4,5} .

Suppose that x can be any real number, and that f is the function

f ( x ) = x 2 + 1 . Find:
(a) (b) (c) (d) (e) Q2-3. the domain of f ; a suitable codomain for f ; the range of f ; the image under f of the set (-3,2]; the pre-image under f of the set [5,6) ;
;

What is the range of the function exp: ? (a) (b) (c)

+ ; (+ ) . f ( x) = 3 2 x
f ( x) = x 1+ x

Q2-4. (a) (b) (c)

What are the ranges of the following functions?

f : ,
f : (+) ,

U : (2+ ) ,

U (Q1 , Q2 ) = 0.7 log Q1 + 0.3 log Q2

Econ 107b Unit 2

- 12 -

RWB

Q2-5.

Consider the function log:+ . Which of the following is true for this function? (a) (b) (c) Codomain=Range; Range=Domain. Domain=Codomain.

Q2-6.

If A has m elements, B has n elements, and m n , then which of the following is certainly true? (a) (b) (c)

A B = B A; A B has mn elements; A B has mn elements.

Q2-7.

Let S be the set {2,3,4,5,6}. Give intensive and extensive definitions of the relation M = is a multiple of, defined on the elements of S , and display the relation in the form of a table. Suppose that h : 2 is the height of terrain function, which we have used several times to illustrate the properties of a function of 2 variables. Interpret the pre-image of a particular height h . Suppose that U : (2+ ) is a utility function defined on a 2-good domain. Interpret the pre-image of a particular utility level U .

Q2-8. (a)

(b) Q2-9.

Suppose that a consumer is choosing how much of each of two goods to buy (see 107A Unit 5 for a discussion of The Consumers Problem). She compares bundles, or baskets, of possible choices. A given bundle can be represented by an ordered pair ( a , b ) , where a , b , representing the amounts (in suitable units) of each good in the bundle. Given certain reasonable-sounding assumptions, the consumers preferences can be represented by a utility function u : 2+ ) . ( What do you think we mean by this last phrase? (a) (b) (c)

( a1 ,b1 ) is preferred to ( a2 , b2 ) iff ( a1 > a 2 )& (b1 > b2 ) ; ( a1 ,b1 ) is preferred to ( a2 , b2 ) iff u(a1 ,b1 ) > u(a2 ,b2 ) ; ( a1 ,b1 ) is preferred to ( a2 , b2 ) iff u(a1 , a2 ) > u(b1 , b2 ) .

Unit 2. Answers. Q2-1. The answers to (a) and (b) are obtained by inspecting what lies at the foot and the head of the arrow in the expression f : A B . (a) (b)
A ; B;

Econ 107b Unit 2

- 13 -

RWB

(c)

The range is the set f ( A) = { f (1), f (2), f (3), f (4)}

= {2,1,2,5} = {1,2,5}
(d) The image under f of the set {2,3} is the set

{ f (2), f (3)} = {1,2} ;


(e) The pre-image under f of the set {2,3,4,5} is the set of all x X such that f (x ) takes one of these values. The equation f ( x ) = 2 has two solutions: x = 1, x = 3 . The equations f ( x ) = 3 and f ( x ) = 4 have no solutions. The equation f ( x ) = 5 has the solution x = 4 . So the pre-image is the set {1,3,4} . Q2-2. (a) (b) (c) (d) (e) Q2-3. (b) Q2-4. (a) Since were told that x can be any real number, the domain is . Theres a choice about the codomain: any convenient set large enough to contain the range. Natural choices here are , + , ( + ) .

range( f ) = {y : y 1} , often written as a sort of interval: [1, ) . [110) (Draw a graph of f to see why.) ,
Quite hard. If you arrived at the correct answer [ 2 , 5 ) ( 5 ,2 ] , youre doing very well indeed. If x , e x + . The range is . Whatever value y we choose, there is some value x such that f ( x ) = 3 2 x = y , (just let x = 1 (3 y ) ). 2 The range is the interval [0,1) , since
x 0. x always lies in this region for 1+ x

(b)

(c)

The range is , since the log function can take any positive or negative values.

Q2-5. (a). Domain is + (does not include 0 ); codomain is , range is (any real number y is the log of another real number, namely e y ). Q2-6. (c). Q2-7. Intensive definition: M = {(x S , y S ): x is a multiple of y} . Extensive definition: M = {( 2 ,2 ), (3,3),( 4 ,2 ),( 4 ,4 ),(5,5),( 6,2 ),( 6,3), (6,6)} . Table:

Econ 107b Unit 2

- 14 -

RWB

xMy 2 2 x 3 4 5 6 1 1 1 1 1 3

y 4 5 6

1 1 1

Q2-8. (a) (b) Q2-9.

The pre-image of h belongs to the domain 2 , and is the set of all points ( x, y ) such that h( x, y ) = h . It can be represented as a contour map. Similarly the pre-image of U is an indifference map in the domain 2+ ) . ( (b) is correct - an exercise in reading impenetrable guff. (a) makes no reference to u and therefore cant be right. (c) involves a horrible mix-up of units (to see whats wrong with it, assume that a measures apples, b measures bananas).

Unit 2. Endnotes.
1

There are also ordered triples (a , b, c) and what are called ordered n-tuples (a1 , a 2 , , a n ) . Tidy-minded mathematicians like to base all mathematics on sets, if they can. They show how to treat ordered pairs in this way by use of a sneaky trick: define (a , b) as an abbreviation for the set {a ,{a , b}} . The use of a set within a set allows them to preserve the information about which element of the set is first. The arrow notation conflicts with our earlier use of an arrow for if ... then .... Both notations are standard, and there wont be any risk of confusion. The notion of function remained vague and befuddled until Dirichlet in 1837 realized it was best to frame the definition in terms of lists of pairs rather than rules: this is because its easy to say what constitutes a list, hard to say what constitutes a rule. My own experience confirms this: functions were shrouded in fog for me until I came across the Dirichlet approach. The notation weve developed allows us to state the Dirichlet definition of a function rather concisely, but rather forbiddingly:

Econ 107b Unit 2

- 15 -

RWB

Let A and B be sets. Then a function f from A to B is a subset of A B satisfying: I. (a A)(b B )(( a , b ) f ) (a A)(b B )(c B )( If ( a , b ) f and ( a , c) f then b = c) .

II.

The fact that f A B shows that all functions are relations (but what follows means that not all relations are functions.) Part I of the definition says that every element of the domain is mapped to some element of the codomain. Part II says that no element of the domain is mapped to more than one element of the codomain. Putting Parts I and II together yields: every element of the domain is mapped to one and only one element of the codomain. Once the definition is out of the way, we can replace the unfamiliar ordered pair notation ( a , b ) f , by the more usual f ( a ) = b .
5

If you dont mind a slightly heavier use of symbols, we can abbreviate this using the notation of Unit 1: A B = {(a , b): a A and b B}

If youd like to try visualizing 4-dimensional objects, some advice about this is given in Rudy Ruckers book The Fourth Dimension.

Econ 107b Unit 2

- 16 -

RWB

You might also like