Exam answer Show all explanations
(a)
Reflexive: Let ( a , b ) (a, b) ( a , b ) be an arbitrary element of N × N \mathbb{N} \times \mathbb{N} N × N . Then a , b ∈ N a, b \in \mathbb{N} a , b ∈ N and
a b = b a ab = ba ab = ba (multiplication is commutative on N \mathbb{N} N )
⇒ ( a , b ) R ( a , b ) \Rightarrow (a, b)R(a, b) ⇒ ( a , b ) R ( a , b ) for all ( a , b ) ∈ N × N (a, b) \in \mathbb{N} \times \mathbb{N} ( a , b ) ∈ N × N .
Why?
Reflexive means every element is related to itself. To test ( a , b ) R ( a , b ) (a, b)R(a, b) ( a , b ) R ( a , b ) , put c = a c = a c = a and d = b d = b d = b in the rule a d = b c ad = bc a d = b c . It becomes a b = b a ab = ba ab = ba , which is always true.
So, R R R is a reflexive relation on N × N \mathbb{N} \times \mathbb{N} N × N .
Symmetric: Let ( a , b ) , ( c , d ) ∈ N × N (a, b), (c, d) \in \mathbb{N} \times \mathbb{N} ( a , b ) , ( c , d ) ∈ N × N with ( a , b ) R ( c , d ) (a, b)R(c, d) ( a , b ) R ( c , d ) . Then
a d = b c ⇒ b c = a d ⇒ c b = d a ⇒ ( c , d ) R ( a , b ) \begin{aligned} &ad = bc \Rightarrow bc = ad \\ &\Rightarrow cb = da \\ &\Rightarrow (c, d)R(a, b) \end{aligned} a d = b c ⇒ b c = a d ⇒ c b = d a ⇒ ( c , d ) R ( a , b )
Why?
Symmetric means: if ( a , b ) R ( c , d ) (a, b)R(c, d) ( a , b ) R ( c , d ) , then ( c , d ) R ( a , b ) (c, d)R(a, b) ( c , d ) R ( a , b ) .
Read the rule carefully. ( p , q ) R ( r , s ) (p, q)R(r, s) ( p , q ) R ( r , s ) means p s = q r ps = qr p s = q r : first of the first pair times second of the second pair equals second of the first times first of the second. For ( c , d ) R ( a , b ) (c, d)R(a, b) ( c , d ) R ( a , b ) this is c b = d a cb = da c b = d a .
We get it from a d = b c ad = bc a d = b c by swapping the two sides and the order in each product.
So, R R R is a symmetric relation on N × N \mathbb{N} \times \mathbb{N} N × N .
Transitive: Let ( a , b ) , ( c , d ) , ( e , f ) ∈ N × N (a, b), (c, d), (e, f) \in \mathbb{N} \times \mathbb{N} ( a , b ) , ( c , d ) , ( e , f ) ∈ N × N with ( a , b ) R ( c , d ) (a, b)R(c, d) ( a , b ) R ( c , d ) and ( c , d ) R ( e , f ) (c, d)R(e, f) ( c , d ) R ( e , f ) . Then
a d = b c and c f = d e ad = bc \text{ and } cf = de a d = b c and c f = d e
Why?
Transitive means: if ( a , b ) R ( c , d ) (a, b)R(c, d) ( a , b ) R ( c , d ) and ( c , d ) R ( e , f ) (c, d)R(e, f) ( c , d ) R ( e , f ) , then ( a , b ) R ( e , f ) (a, b)R(e, f) ( a , b ) R ( e , f ) . Write the rule for each given pair. The target is a f = b e af = be a f = b e .
⇒ ( a d ) ( c f ) = ( b c ) ( d e ) ⇒ a f = b e ( as c d ≠ 0 ) ⇒ ( a , b ) R ( e , f ) \begin{aligned} &\Rightarrow (ad)(cf) = (bc)(de) \\ &\Rightarrow af = be \quad (\text{as } cd \ne 0) \\ &\Rightarrow (a, b)R(e, f) \end{aligned} ⇒ ( a d ) ( c f ) = ( b c ) ( d e ) ⇒ a f = b e ( as c d = 0 ) ⇒ ( a , b ) R ( e , f )
Why?
Multiply the two equations side by side. Both sides now contain the factor c d cd c d :
( a d ) ( c f ) = a ⋅ c ⋅ d ⋅ f = ( a f ) ( c d ) ( b c ) ( d e ) = b ⋅ c ⋅ d ⋅ e = ( b e ) ( c d ) \begin{aligned} (ad)(cf) &= a \cdot c \cdot d \cdot f = (af)(cd) \\ (bc)(de) &= b \cdot c \cdot d \cdot e = (be)(cd) \end{aligned} ( a d ) ( c f ) ( b c ) ( d e ) = a ⋅ c ⋅ d ⋅ f = ( a f ) ( c d ) = b ⋅ c ⋅ d ⋅ e = ( b e ) ( c d )
( a f ) ( c d ) = ( b e ) ( c d ) (af)(cd) = (be)(cd) ( a f ) ( c d ) = ( b e ) ( c d )
c c c and d d d are natural numbers, so c d ≠ 0 cd \ne 0 c d = 0 , and we may divide by it.
( a f ) ( c d ) c d = ( b e ) ( c d ) c d a f = b e \begin{aligned} \frac{(af)(cd)}{cd} &= \frac{(be)(cd)}{cd} \\ af &= be \end{aligned} c d ( a f ) ( c d ) a f = c d ( b e ) ( c d ) = b e
Watch out: cancelling is only allowed for a factor that cannot be 0. Say why, as the bracket does.
So, R R R is a transitive relation on N × N \mathbb{N} \times \mathbb{N} N × N .
As the relation R R R is reflexive, symmetric and transitive, it is an equivalence relation on N × N \mathbb{N} \times \mathbb{N} N × N .
[ ( 2 , 6 ) ] = { ( x , y ) ∈ N × N : ( x , y ) R ( 2 , 6 ) } = { ( x , y ) ∈ N × N : 6 x = 2 y } = { ( x , y ) ∈ N × N : 3 x = y } \begin{aligned} &[(2, 6)] \\ &= \{(x, y) \in \mathbb{N} \times \mathbb{N} : (x, y)R(2, 6)\} \\ &= \{(x, y) \in \mathbb{N} \times \mathbb{N} : 6x = 2y\} \\ &= \{(x, y) \in \mathbb{N} \times \mathbb{N} : 3x = y\} \end{aligned} [( 2 , 6 )] = {( x , y ) ∈ N × N : ( x , y ) R ( 2 , 6 )} = {( x , y ) ∈ N × N : 6 x = 2 y } = {( x , y ) ∈ N × N : 3 x = y }
Why?
The equivalence class of ( 2 , 6 ) (2, 6) ( 2 , 6 ) is the set of all pairs related to ( 2 , 6 ) (2, 6) ( 2 , 6 ) .
By the rule, ( x , y ) R ( 2 , 6 ) (x, y)R(2, 6) ( x , y ) R ( 2 , 6 ) means x ⋅ 6 = y ⋅ 2 x \cdot 6 = y \cdot 2 x ⋅ 6 = y ⋅ 2 . Dividing by 2 gives y = 3 x y = 3x y = 3 x . Every natural number x x x gives such a pair, so the class is infinite.
x ⋅ 6 = y ⋅ 2 6 x = 2 y 6 x 2 = 2 y 2 3 x = y \begin{aligned} x \cdot 6 &= y \cdot 2 \\ 6x &= 2y \\ \frac{6x}{2} &= \frac{2y}{2} \\ 3x &= y \end{aligned} x ⋅ 6 6 x 2 6 x 3 x = y ⋅ 2 = 2 y = 2 2 y = y
For example x = 1 x = 1 x = 1 gives y = 3 y = 3 y = 3 , and x = 3 x = 3 x = 3 gives y = 9 y = 9 y = 9 .
[ ( 2 , 6 ) ] = { ( x , 3 x ) : x ∈ N } [(2, 6)] = \{(x, 3x) : x \in \mathbb{N}\} [( 2 , 6 )] = {( x , 3 x ) : x ∈ N } = { ( 1 , 3 ) , ( 2 , 6 ) , ( 3 , 9 ) , … } = \{(1, 3), (2, 6), (3, 9), \ldots\} = {( 1 , 3 ) , ( 2 , 6 ) , ( 3 , 9 ) , … }
(b)
f ( x ) = { x 1 + x , if x ≥ 0 x 1 − x , if x < 0 f(x) = \begin{cases} \dfrac{x}{1 + x}, & \text{if } x \ge 0 \\[6pt] \dfrac{x}{1 - x}, & \text{if } x < 0 \end{cases} f ( x ) = ⎩ ⎨ ⎧ 1 + x x , 1 − x x , if x ≥ 0 if x < 0
Why?
Remove the modulus first: ∣ x ∣ = x |x| = x ∣ x ∣ = x when x ≥ 0 x \ge 0 x ≥ 0 , and ∣ x ∣ = − x |x| = -x ∣ x ∣ = − x when x < 0 x < 0 x < 0 . So 1 + ∣ x ∣ 1 + |x| 1 + ∣ x ∣ is 1 + x 1 + x 1 + x or 1 − x 1 - x 1 − x .
The plan: prove one-one and onto on each piece, then check that the two pieces never share a value.
Case 1: x ≥ 0 x \ge 0 x ≥ 0 , f ( x ) = x 1 + x f(x) = \dfrac{x}{1 + x} f ( x ) = 1 + x x .
Injectivity: let x , y ≥ 0 x, y \ge 0 x , y ≥ 0 with f ( x ) = f ( y ) f(x) = f(y) f ( x ) = f ( y ) . Then
x 1 + x = y 1 + y \frac{x}{1 + x} = \frac{y}{1 + y} 1 + x x = 1 + y y
⇒ x + x y = y + x y ⇒ x = y \Rightarrow x + xy = y + xy \Rightarrow x = y ⇒ x + x y = y + x y ⇒ x = y
Why?
One-one means equal outputs come only from equal inputs: f ( x ) = f ( y ) ⇒ x = y f(x) = f(y) \Rightarrow x = y f ( x ) = f ( y ) ⇒ x = y .
Cross-multiply (both denominators are positive): x ( 1 + y ) = y ( 1 + x ) x(1 + y) = y(1 + x) x ( 1 + y ) = y ( 1 + x ) . Expand, and the x y xy x y terms cancel.
x ( 1 + y ) = y ( 1 + x ) x + x y = y + x y x = y ( subtract x y ) \begin{aligned} x(1 + y) &= y(1 + x) \\ x + xy &= y + xy \\ x &= y \quad (\text{subtract } xy) \end{aligned} x ( 1 + y ) x + x y x = y ( 1 + x ) = y + x y = y ( subtract x y )
So, f f f is injective on [ 0 , ∞ ) [0, \infty) [ 0 , ∞ ) .
Surjectivity: for x ≥ 0 x \ge 0 x ≥ 0 ,
f ( x ) = x 1 + x ≥ 0 f(x) = \frac{x}{1 + x} \ge 0 f ( x ) = 1 + x x ≥ 0
f ( x ) = 1 − 1 1 + x < 1 f(x) = 1 - \frac{1}{1 + x} < 1 f ( x ) = 1 − 1 + x 1 < 1
Why?
These two lines show that the values on this piece lie in [ 0 , 1 ) [0, 1) [ 0 , 1 ) . The rewrite is
x 1 + x = ( 1 + x ) − 1 1 + x \frac{x}{1 + x} = \frac{(1 + x) - 1}{1 + x} 1 + x x = 1 + x ( 1 + x ) − 1
Split it into two fractions:
( 1 + x ) − 1 1 + x = 1 + x 1 + x − 1 1 + x = 1 − 1 1 + x \begin{aligned} \frac{(1 + x) - 1}{1 + x} &= \frac{1 + x}{1 + x} - \frac{1}{1 + x} \\ &= 1 - \frac{1}{1 + x} \end{aligned} 1 + x ( 1 + x ) − 1 = 1 + x 1 + x − 1 + x 1 = 1 − 1 + x 1
Since 1 1 + x > 0 \frac{1}{1 + x} > 0 1 + x 1 > 0 , the value is less than 1.
It is ≥ 0 \ge 0 ≥ 0 because the top x ≥ 0 x \ge 0 x ≥ 0 and the bottom 1 + x > 0 1 + x > 0 1 + x > 0 .
Let y ∈ [ 0 , 1 ) y \in [0, 1) y ∈ [ 0 , 1 ) . Then x = y 1 − y ≥ 0 x = \dfrac{y}{1 - y} \ge 0 x = 1 − y y ≥ 0 and
f ( x ) = y 1 − y 1 + y 1 − y = y f(x) = \frac{\frac{y}{1 - y}}{1 + \frac{y}{1 - y}} = y f ( x ) = 1 + 1 − y y 1 − y y = y
Why?
Onto means every value in the target is reached. To find the input, solve y = x 1 + x y = \frac{x}{1 + x} y = 1 + x x for x x x :
y = x 1 + x y ( 1 + x ) = x ( × ( 1 + x ) ) y + x y = x y = x − x y ( subtract x y ) y = x ( 1 − y ) ( take out x ) x = y 1 − y ( ÷ ( 1 − y ) ) \begin{aligned} y &= \frac{x}{1 + x} \\ y(1 + x) &= x \quad (\times\,(1 + x)) \\ y + xy &= x \\ y &= x - xy \quad (\text{subtract } xy) \\ y &= x(1 - y) \quad (\text{take out } x) \\ x &= \frac{y}{1 - y} \quad (\div\,(1 - y)) \end{aligned} y y ( 1 + x ) y + x y y y x = 1 + x x = x ( × ( 1 + x )) = x = x − x y ( subtract x y ) = x ( 1 − y ) ( take out x ) = 1 − y y ( ÷ ( 1 − y ))
As 0 ≤ y < 1 0 \le y < 1 0 ≤ y < 1 , the top is ≥ 0 \ge 0 ≥ 0 and the bottom is positive, so x ≥ 0 x \ge 0 x ≥ 0 , as Case 1 needs.
In the check, the bottom is 1 + y 1 − y = 1 1 − y 1 + \frac{y}{1 - y} = \frac{1}{1 - y} 1 + 1 − y y = 1 − y 1 , so the fraction is y y y .
1 + y 1 − y = 1 − y 1 − y + y 1 − y = 1 − y + y 1 − y = 1 1 − y y 1 − y ÷ 1 1 − y = y 1 − y × 1 − y 1 = y \begin{aligned} 1 + \frac{y}{1 - y} &= \frac{1 - y}{1 - y} + \frac{y}{1 - y} \\ &= \frac{1 - y + y}{1 - y} = \frac{1}{1 - y} \\[4pt] \frac{y}{1 - y} \div \frac{1}{1 - y} &= \frac{y}{1 - y} \times \frac{1 - y}{1} \\ &= y \end{aligned} 1 + 1 − y y 1 − y y ÷ 1 − y 1 = 1 − y 1 − y + 1 − y y = 1 − y 1 − y + y = 1 − y 1 = 1 − y y × 1 1 − y = y
So, f f f is onto from [ 0 , ∞ ) [0, \infty) [ 0 , ∞ ) to [ 0 , 1 ) [0, 1) [ 0 , 1 ) .
Case 2: x < 0 x < 0 x < 0 , f ( x ) = x 1 − x f(x) = \dfrac{x}{1 - x} f ( x ) = 1 − x x .
Injectivity: let x , y < 0 x, y < 0 x , y < 0 with f ( x ) = f ( y ) f(x) = f(y) f ( x ) = f ( y ) . Then
x 1 − x = y 1 − y \frac{x}{1 - x} = \frac{y}{1 - y} 1 − x x = 1 − y y
⇒ x − x y = y − x y ⇒ x = y \Rightarrow x - xy = y - xy \Rightarrow x = y ⇒ x − x y = y − x y ⇒ x = y
Why?
Cross-multiply (both denominators are positive, since x , y < 0 x, y < 0 x , y < 0 ) . Expand, and the x y xy x y terms cancel:
x ( 1 − y ) = y ( 1 − x ) x − x y = y − x y x = y ( add x y ) \begin{aligned} x(1 - y) &= y(1 - x) \\ x - xy &= y - xy \\ x &= y \quad (\text{add } xy) \end{aligned} x ( 1 − y ) x − x y x = y ( 1 − x ) = y − x y = y ( add x y )
So, f f f is injective on ( − ∞ , 0 ) (-\infty, 0) ( − ∞ , 0 ) .
Surjectivity: for x < 0 x < 0 x < 0 ,
f ( x ) = x 1 − x < 0 f(x) = \frac{x}{1 - x} < 0 f ( x ) = 1 − x x < 0
f ( x ) = − 1 + 1 1 − x > − 1 f(x) = -1 + \frac{1}{1 - x} > -1 f ( x ) = − 1 + 1 − x 1 > − 1
Why?
Same steps as Case 1. For x < 0 x < 0 x < 0 , 1 − x > 0 1 - x > 0 1 − x > 0 , so the cross-multiplying is safe, and
x 1 − x = − ( 1 − x ) + 1 1 − x \frac{x}{1 - x} = \frac{-(1 - x) + 1}{1 - x} 1 − x x = 1 − x − ( 1 − x ) + 1
(The top is − 1 + x + 1 = x -1 + x + 1 = x − 1 + x + 1 = x . ) Split it into two fractions:
− ( 1 − x ) + 1 1 − x = − 1 − x 1 − x + 1 1 − x = − 1 + 1 1 − x \begin{aligned} \frac{-(1 - x) + 1}{1 - x} &= -\frac{1 - x}{1 - x} + \frac{1}{1 - x} \\ &= -1 + \frac{1}{1 - x} \end{aligned} 1 − x − ( 1 − x ) + 1 = − 1 − x 1 − x + 1 − x 1 = − 1 + 1 − x 1
Since 1 1 − x > 0 \frac{1}{1 - x} > 0 1 − x 1 > 0 , the value is more than − 1 -1 − 1 , and it is negative because the top is negative.
Let y ∈ ( − 1 , 0 ) y \in (-1, 0) y ∈ ( − 1 , 0 ) . Then x = y 1 + y < 0 x = \dfrac{y}{1 + y} < 0 x = 1 + y y < 0 and
f ( x ) = y 1 + y 1 − y 1 + y = y f(x) = \frac{\frac{y}{1 + y}}{1 - \frac{y}{1 + y}} = y f ( x ) = 1 − 1 + y y 1 + y y = y
Why?
Solve y = x 1 − x y = \frac{x}{1 - x} y = 1 − x x for x x x : y − x y = x y - xy = x y − x y = x , so x ( 1 + y ) = y x(1 + y) = y x ( 1 + y ) = y and x = y 1 + y x = \frac{y}{1 + y} x = 1 + y y .
y ( 1 − x ) = x ( × ( 1 − x ) ) y − x y = x y = x + x y ( add x y ) y = x ( 1 + y ) ( take out x ) x = y 1 + y ( ÷ ( 1 + y ) ) \begin{aligned} y(1 - x) &= x \quad (\times\,(1 - x)) \\ y - xy &= x \\ y &= x + xy \quad (\text{add } xy) \\ y &= x(1 + y) \quad (\text{take out } x) \\ x &= \frac{y}{1 + y} \quad (\div\,(1 + y)) \end{aligned} y ( 1 − x ) y − x y y y x = x ( × ( 1 − x )) = x = x + x y ( add x y ) = x ( 1 + y ) ( take out x ) = 1 + y y ( ÷ ( 1 + y ))
In the check, the bottom is
1 − y 1 + y = 1 + y 1 + y − y 1 + y = 1 + y − y 1 + y = 1 1 + y y 1 + y ÷ 1 1 + y = y 1 + y × 1 + y 1 = y \begin{aligned} 1 - \frac{y}{1 + y} &= \frac{1 + y}{1 + y} - \frac{y}{1 + y} \\ &= \frac{1 + y - y}{1 + y} = \frac{1}{1 + y} \\[4pt] \frac{y}{1 + y} \div \frac{1}{1 + y} &= \frac{y}{1 + y} \times \frac{1 + y}{1} \\ &= y \end{aligned} 1 − 1 + y y 1 + y y ÷ 1 + y 1 = 1 + y 1 + y − 1 + y y = 1 + y 1 + y − y = 1 + y 1 = 1 + y y × 1 1 + y = y
As − 1 < y < 0 -1 < y < 0 − 1 < y < 0 , the top is negative and the bottom is positive, so x < 0 x < 0 x < 0 , as Case 2 needs.
So, f f f is onto from ( − ∞ , 0 ) (-\infty, 0) ( − ∞ , 0 ) to ( − 1 , 0 ) (-1, 0) ( − 1 , 0 ) .
Case 3: Injectivity: let x ≥ 0 x \ge 0 x ≥ 0 and y < 0 y < 0 y < 0 . Then f ( x ) ≥ 0 f(x) \ge 0 f ( x ) ≥ 0 and f ( y ) < 0 f(y) < 0 f ( y ) < 0 , so f ( x ) ≠ f ( y ) f(x) \ne f(y) f ( x ) = f ( y ) when x ≠ y x \ne y x = y .
Why?
Cases 1 and 2 only compare inputs from the same piece. A non-negative input and a negative input give outputs of opposite signs, so they can never give the same output. Together the three cases cover every pair of different inputs.
Hence f f f is one-one on R \mathbb{R} R , and its range is [ 0 , 1 ) ∪ ( − 1 , 0 ) = ( − 1 , 1 ) [0, 1) \cup (-1, 0) = (-1, 1) [ 0 , 1 ) ∪ ( − 1 , 0 ) = ( − 1 , 1 ) , the whole co-domain.
Hence f f f is one-one and onto function.