# Linear Functions

In this lesson, you will learn about functions: rules which assign outputs to inputs.

## Definition of a function

A function is a rule which assigns a single output (\$y\$-value) to each of its inputs (\$x\$-values). Not every number needs to be a possible input.

The table below gives an example of a function. The \$(x,y)\$ values shown in the table are also plotted on the grid to the left.

\$x\$\$\cl"red"y\$
 What output does this function assign to the input 1?
 Does this table assign a single output to each of its inputs?

Click . Now the \$(x,y)\$ values shown in the next table below are plotted on the grid to the left.

\$x\$\$\cl"red"y\$
 What output does this table assign to the input 0?
 What outputs does this table assign to the input 1?
 Does this table assign a single output to each input?
 Does this table give a function?

In table-qn, you looked at a function where the rule was given by a table. You can also use a graph to give the rule for a function. The graph plotted on the grid to the left is an example of this.

You can click inside the grid and drag the vertical bar around to see the \$y\$-value corresponding to each \$x\$-value, under the words “Trace at:” to the right of the grid. For example, you can set the vertical bar to \$x=2\$. Then the information to the right of the grid will tell you that the function assigns the output 4 to the input 2.

 What output does this function assign to the input 1?
 What output does the function assign to the input 3?
 Does this function assign a single output to each input? (That is, does the vertical bar always meet the graph of the function in at most one place?)

Click to see another graph plotted on the grid to the left.

 What output does this graph assign to the input 0?
 What outputs does this graph assign to the input 1?
 Does this graph assign a single output to each of its inputs?
 Does this graph give a function?

## Linear functions

Another way to give a rule is to use a formula. For example, there is a function that takes each input \$x\$ and assigns to it the output \$2x-3\$. If you give it the input \$1\$, it produces the output \$2(1)-3=-1\$.

Each row of the table below gives an input to this function. Enter the corresponding output.

input
(\$x\$)
output
(\$\cl"red"{2x-3}\$)
 For any input \$x\$, does this function always assign an output?

Click to see the entire graph of this function. This is the graph of \$y=2x-3\$, so it is a straight line.

 Is the slope of this line positive or negative?
 As the input increases (gets bigger) does the output increase or decrease?
 Does the graph of this function go up and to the right or down and to the right?

The function which assigns the output \$-x+2\$ to the input \$x\$ is graphed on the grid to the left.

 Is the graph of this function a straight line?
 Is the slope of this line positive or negative?
 As the input increases (gets bigger) does the output increase or decrease?
 Does the graph of this function go up and to the right or down and to the right?

A function whose output always increases as its input increases is called an increasing function. A function whose output always decreases as its input increases is called a decreasing function.

 Is the function which assigns the output \$-x+2\$ to the input \$x\$ increasing or decreasing?

A function whose graph is a straight line (that is, a function given by a formula of the form \$mx+b\$) is called a linear function.

 Is the function which assigns the output \$-x+2\$ to the input \$x\$ linear?
 Click to see the graph of the function from the previous question, which assigns the output \$2x-3\$ to the input \$x\$. Is this function increasing or decreasing?
 Is the function which assigns the output \$2x-3\$ to the input \$x\$ linear?

In general:

A function is increasing whenever its graph goes up and to the right. It is decreasing whenever its graph goes down and to the right.

A linear function is increasing whenever the slope of its graph is positive. It is decreasing whenever the slope of its graph is negative.

## Height of a ball

A ball is dropped from a window 30 meters above the ground. We will study the function whose input is the number of seconds \$t\$ since the ball was dropped, and whose output is the height of the ball \$\cl"red"h\$ above the ground (in meters). This function is graphed on the grid to the left.

 How high above the ground is the ball when \$t=1\$? (Remember, you can use the information under “Trace at:” to answer questions like this.) meters
 Approximately how long after being dropped does the ball hit the ground (have height 0)? seconds
 Does the graph of this function go up and to the right, down and to the right, or neither?
 Is this an increasing function, a decreasing function, or neither?
 Is the graph of this function a straight line?
 Is this function linear?

A catapult shoots a pumpkin into the air. The function whose input is the number of seconds \$t\$ since the pumpkin was released, and whose output is the height of the pumpkin \$\cl"red"h\$ above the ground in meters, is graphed on the grid to the left.

 How high above the ground is the pumpkin when \$t=1\$? meters
 How long after being released does the pumpkin hit the ground (have height 0)? seconds
 Is this function linear?
 Is this an increasing function, a decreasing function, or neither?
 When \$x\$ is between 0 and 3, does the graph of this function go up and to the right, down and to the right, or neither?
 When \$x\$ is between 0 and 3, is the function increasing, decreasing, or neither?
 When \$x\$ is between 3 and 6, does the graph of this function go up and to the right, down and to the right, or neither?
 When \$x\$ is between 3 and 6, is the function increasing, decreasing, or neither?