Lecture 1 Flashcards
What are functions?
A process that associates one set (input) with another set (output); forms a relationship between two sets
A rule that maps a unique element of the domain to ONLY ONE other unique element of the codomain.
What are sets?
A set is an unordered collection of distinct/unique ‘objects/entities/elements’
NOTE: Cannot have any repeating elemenets, unlike an array/list
What are the notations used for sets? What do they define?
x ∈ B if x is an element of B
x ∈/ B if x is not in B
A ⊆ B is every a ∈ A lies also in B,
A is a subset of B
A ∩ B is the set of all elements that lie in A AND in B;
we say A ∩ B is the intersection of A and B.
A ∪ B is the set of ALL elements that lie in A OR in B;
we say A ∪ B is the union of A and B.
A \ B is the set of all elements in A that are NOT in B
How do you define by attributes/properties?
If S is a set and, and P is a property of elements in S, then
{x ∈ S : P(x)}
is the set all elements of S which have the property P
e.g. {x ∈ Z : −1 <= x <= 1} = {−1, 0, 1}
What are intervals?
[a, b] = {x ∈ R : a <= x <= b}
[] = closed intervals, includes a and b
(a, b) = {x ∈ R : a < x < b}
() = open intervals, excludes a and b
Can mix interval signs
[a, b) = {x ∈ R : a <= x < b}
What is Pi notation?
A shorthand notation to write out products in a more compact form.
NOTE: Empty set results in empty product = 1 BY CONVENTION
(techinically undefined)
What is Sigma notation?
A way to write sums in a more compact form.
NOTE: Empty set results in empty sum = 0 BY CONVENTION (technically undefined)
If the function is a constant, x acts as a counter only rather than affecting the value.
What are images?
The image of f : X → Y is the set f (X) = {f (x) : x ∈ X}.
It is a subset of the codomain that can be reached by elements in the domain using the applied rule; the range of the function.
What is Barber’s paradox?
What are some important sets?
{} or ∅ is the empty set
N is the set of natural numbers
{0, 1, 2, . . .}
Z is the set of integers
{. . . , −2, −1, 0, 1, 2, . . .}
R is the set of real numbers (all numbers on a
’standard’ number line,
e.g. 5,√2, 2/3, −π, . . .
What is Russel’s paradox?
True or false? a ∈ {{a, b}, {c, d}, {a}}
False
no element a
only elements {a, b}, {c, d}, {a}
List all alements of following sets
1. {x ∈ Z : x ∈ {−1, 0, 1.5}}
- {x ∈ N : x is odd and x 6 5}
- {-1, 0}
- {1, 3, 5}
Answer this by creating a set with the elements, NEEDS {}!!!
Can sigma and pi notations have multiple ways to be written down?
Yes
What is the domain and codomain?
Domain = where inputs are housed
Codomain = where outputs are housed
What does a function need?
- Domain
- Co-domain
- ‘Rule’
How do we define function graphs?
The graph (or plot) of f : X → Y is {(x, f (x)) : x ∈ X}
What happens if if we don’t specify the codomain in a function?
We choose the image as the codomain.
What happens if we don’t specify the domain?
By convention, we choose all real numbers R as the domain X –> R
What are zeros or roots?
This is the point of a function where all points x are elements of the domain AND f(x) = 0
Root = x-intercepts!
What is an inverse function?
A function that has the domain and codomains swapped AND the function takes the inverse of f(x) back to x. Essentially undoes the function applied on x/y.
g(f(x)) = x where g(x) is the inverse function
AND
f(g(y))= y
g(x) = f^-1(x)
MUST GO BOTH WAYS!
Do inverse functions always exist?
NO, but if they do then they are unique!
Ways to tell if a function does not have an inverse?
If the domain and co-domain cannot be reversed without any conflicts
If there are no unique choices when finding the unique element to reverse.
Ways to tell if a function does not have an inverse?
If the domain and co-domain cannot be reversed without any conflicts
If there are no unique choices when finding the unique element to reverse. REMEMBER, each element needs to have a unique element between and domain and codomain to determine inverse.
f has an inverse function if and only if it is bijective
How do we find the inverse?
f(x) = y, solve for x
Define injective?
Means that for all elements of X, there is a unique element in Y when the function f(x) is applied to these elements.
Distinct inputs give distinct outputs.
Define surjective
If the image of function f is Y, that is Y = f(X). THE IMAGE IS EQUAL TO CODOMAIN!
for every y ∈ 2 there is some x ∈ X with f (x) = y
Define bijective?
When a function is BOTH injective and surjective.
How to determine if function is injective/surjective/bijective?
For injective:
Determine if f(x1) = f(x2) where x1, x2 ∈ R
if f(x1) = f(x2) true AND x1 =/ x2 , then NOT injective
For surjective:
Take arbritrary number and show that we can reach it as an image.
if y ∈ R, then y = f(x) and solve for x
If real number AND is within domain then surjective
How to define a convex function?
No two points are below the function
How to define a concave function?
No two points are above the function
What is a linear function?
f(x) = mx + b
m is the slope of f
b = f(0) is the y-intercept
How to calculate m?
y2-y1 / x2 - x1