Lecture 2
Relation: subset of the Cartesian product Example. \(\{(x,y) | y \leq x \}\)
Function: a relation where for each \(x\) there is a unique \(y\) \[f: X \rightarrow Y, \quad y = f(x)\] Examples. \(y = x, y=x^2, y=2x+3\)
\(X:\) domain, \(Y:\) codomain, \(f(X):\) range
Most functions we will encounter, \(f: \mathbb{R}^k \rightarrow \mathbb{R}\)
Let’s say, \[f: X \rightarrow \mathbb{R}, \quad y = 3x-5\] where \(X = \{2,3,4\}\). What is the range?
Consider the total cost \(C\) of producing hats \(Q\), \[C = f(Q)\]
Should I be able to produce 10 hats and 5 hats at the same cost?
Possible to produce 5 hats for $20 and $25?
Consider the total cost \(C\) of producing hats \(Q\), \[C = f(Q) = 2Q + 5\]
What is the cost of producing 1 hat? What is the cost of producing 2 hats? How many hats can I produce for $25?
Constant: \(y = f(x) = 5\)
Polynomial of degree \(n\)
\(n=0\), constant
\(n=1\), linear
\(n=2\), quadratic
\(n=3\), cubic
…
Rational function: ratio of two polynomial functions: \[y = \frac{a}{x}\]
Functions can be of two variables: \[z=g(x,y)\] Or three, or four,…, or \(n\)
Strictly increasing function: \[x_{1}>x_{2} \rightarrow f\left(x_{1}\right)>f\left(x_{2}\right)\] Strictly decreasing function: \[x_{1}>x_{2} \rightarrow f\left(x_{1}\right)<f\left(x_{2}\right)\] Increasing function: \[x_{1}>x_{2} \rightarrow f\left(x_{1}\right)\geq f\left(x_{2}\right)\] Decreasing function: \[x_{1}>x_{2} \rightarrow f\left(x_{1}\right)\leq f\left(x_{2}\right)\]
Function \(y=f(X)\) has an inverse if it is a one-to-one mapping, i.e. each value of \(y\) is associated with a unique value of \(x\). Inverse function \[x=f^{-1}(y)\] returns the value corresponding value of \(x\) for each \(y\). One-to-one mapping unique to strictly monotonic functions
Example: Find the inverse of \(y = f(x) = 3x-2\).
What is \(x \times x\)? What is \(x^2 \times x\)? What is \(x^2 \times x^2\)? More generally, \(x^n \times x^m = x^{m+n}\)
\[\sum_{i=1}^N x_i = x_1 + x_2 + ... + x_N\]
Example: \(x = \{2,9,6,8,11,14\}\) \(\sum_{i=1}^{4} x_i = x_1 + x_2 + x_3 + x_4 = 2+9+6+8=25\)
Another way of using a summation sign is to write \[\sum_{x \in A} x\] which refers to summing up all elements in \(A\). To sum up \(x\) for all possible values \(x\), we can simply write \[\sum_x x\]
\(q\) is a necessary condition for \(p\) if: \[p \implies q\]
\(p\): I ate tofu for dinner \(q\): My dinner had protein
\(q\) is a sufficient condition for \(p\) if: \[p \impliedby q\]
\(p\): A number is even \(q\): A number is divisible by 4
\(q\) is both necessary and sufficient for \(p\) \[p \iff q\]
\(p\): A number is even \(q\): A number is divisible by 2
\(p\): It is a holiday \(q\): It is Thanksgiving
\(p\): The car is out of gas \(q\): The car isn’t starting
\(p\): A geometric figure has four sides \(q\): It is a rectangle
Exercise 2.3: 1, 2
Exercise 2.4: 5, 7, 8
Exercise 2.5: 1 (For each part, find the inverse of the function too.)
Exercise 4.2: 6, 8
Exercise 5.1: 1