Functions
Definition
A function
is a rule relating to 2 sets
1 in such a way that it assigns only 1 element of one set
1 to an element of another set
1
Programmatic Intuition
It can be looked at as a black box
which takes one input
, does something to it and produces an output
.
Notation
Since function
is a relation between 2 variables, we can write it as:
Where \(x\) is called the independant variable
because it is our input
of choice and \(y\) is called dependant variable
since it depends of \(x\).
Domain and Range
Domain
The \(x\) comes from a set
1 that is Set X
called its domain
.
Types of Domains
Natural Domain
This domain
comes out as a result of the formula of the function
itself.
Example
Here, the function
becomes undefined due to division by zero
at \(x = 2\).
Hence, the domain
is \(\mathbb{R} - \{2\}\) or \((- \infty, 2) \cup (2, \infty)\).
Restricted Domain
Sometimes, the domain
of a function
can be altered by doing operations from algebra on the function
to simplify it.
Example
We can simplify this and get
Notice how the domain
of \(f(x)\) excludes 2
but in case of \(h(x)\) the function
is actually defined.
Therefore, we have to write it as
Range
The \(y\) comes from a set
1 that is Set Y
called its range
.
One of the techniques in finding range
is to perform algebraic operations
Example
If we convert this equation to solve for \(x\), we get:
Clearly, we can see that \(y \ne 1\).
Therefore, the range is:
Piecewise Function
The graph of this function
looks something like this.
Even
And Odd
Even
A function
is called even function
if
Intuitively, this means that the function
is mirrored by only \(y\) axis.
Odd
A function
is called odd function
if
Intuitively, this means that the function
is mirrored by \(y\) axis and then mirrored copy is inverted by \(x\) axis.