# Linear function

Before we define linear function let’s first define few terms. We all know what a number line is, but now we’ll have to go a step further and define a *number plane*.

A **number plane** has two axis, *horizontal* and *vertical*. Vertical is called the $y$-axis, and horizontal $x$-axis. It is also known as __Cartesian plane__.

Their intersection will be marked with point $O$, on the $x$-axis, numbers on the left will be negative and on the right positive, and on $y$-axis, numbers below $0$ will be negative and above positive.

A coordinate is an **ordered pair of numbers** which tells us where specific point is located. First number indicates where the point is located considering $x$- axis, and second considering $y$- axis. The plain is divided into quadrants.

**Linear function** is a function given by a rule $ f(x) = a \cdot x$, where $a$ is from $a$ set of real numbers. In our examples $f (x)$, placed on the bottom of this lessons, will be replaced with $y$. In this rule, $x$ is the changeable variable. That means that you can take any numbers in the place of $x$ and get yourself an ordered pair of numbers. Every function is represented by a graph. A graph is a set of all ordered pairs that satisfy rule of a function. For linear functions that graph is a straight line that goes trough the $(0, 0)$ coordinate. There are two parts of every linear function, the dependent variable, or $f(x)$ in this case, and independant variable, $x$. This only means that you take x arbitrarily, and your $f(x)$ depends on your choice.

**Example: **Draw a graph of linear function: $f(x) = 2x$

First you have to make your dependant/independant variable table.

This is how it will usually looks like. You only need two points to make a line, but for precise in drawings, this time we’ll take three points.

Now, how to get $f(x)$. You have your function rule. In that rule you “put you $x$ to get $f(x)$”.

$ f(x) = 2x$ => $ f(-1)= 2(-1) = -2$ => $ f(0) = 2 * 0 = 0$ $ f(1) = 2 * 1 = 2$

Now you have your ordered pairs : $(-1,-2), (0,0), (1,2)$ .All you have to do to make a graph is put them in the plane, and connect them with a straight line. So how do you put them in a plane?

Now we have linear function graph which is a line.

The number infront of variable $x$ indicates **the slope of your line**.

## Slope

The slope of a line is a number that describes steepness and direction of the line.

If we have two points:

$A=(x_1,y_1)$

$B=(x_2,y_2)$

A slope ($a$) is calculated by the formula:

$a=\frac{y_2-y_1}{x_2-x_1}$

If the slope is equal to number $0$, then the line will be paralel with $x$ – axis. $f(x) = b$.

If variable $x$ is a constant $x =c$, that will represent a line paralel to $y$-axis.

When we’re comparing two lines, if their slopes are equal they are parallel, and if they are in a relation $a_1=-\frac{1}{a_2} they are *perpendicular*.

**Example:** Let’s say we know two points on our line: $ A(-1, 2)$ and $ B(4, 3)$. Calculate the slope.

Slope is usually marked with an ‘$a$’.

$\ a = \frac{y_2 – y_1}{x_2 – x_1} = \frac{3 – 2}{4 + 1} = \frac{1}{5}$ So, the slope of this line equals to $ \frac{1}{5}$. All lines paralel to this one will also have slope equal to $\frac{1}{5}$, and all lines perpendicular $- 5$.

If you are given only a line in a coordinate plane, and you have to calculate the slope, you simply read off two points and put them in a formula.

**Example**: Draw a graph of : $\ f (x) = – 2x$

Again, first we draw the table:

$f(-1) = -2(-1) = 2$

$ f(0) = 0$ (if the function is linear this will always be true)

$ f(1) = -2 \cdot 1 = – 2$

Ordered pairs : $(-1, 2), (0,0), (1,-2)$

**Example**: Draw a graph of : $ f (x) = \frac{1}{2}x$

When there is a fraction involved, it is easier to take his multiples so we can get whole numbers:

Since the number which multiplies x indicates slope of the line, the smaller he is, the smaller that slope is, in other words the smaller that number is, your line will be closer to $x$-axis.

## Affine function

Affine function is a function given by a rule $f (x) = a \cdot x + b$ , where $a$ and $b$ are from the set of real numbers.

Let’s compare it with linear function : $ f(x) = ax$. He indicates the shift on the $y$- axis. If it is positive, whole graph will go up on the $y$- axis, and if it is negative down.

**Example**: Draw a graph of : $ f (x) = x + 4$.

There are two ways you can draw this graph, first one is that you draw $f(x) = x$ and than move all point up for $4$ unit length.

Second one is the same as we used to draw linear functions.

This form of functions is called the explicit form. You can also present it by implicit form: $ax+by+c=0$. You can easily turn int into explicit by turning all but by on the right side, and than dividing by $b$.

## Worksheets

Linear function

**Linear functions - Point-slope form** (161.7 KiB, 1,080 hits)

**Linear function - Slope-intercept form** (208.7 KiB, 1,011 hits)

**Linear functions - Standard form** (972.7 KiB, 902 hits)

**Graphing linear functions** (2.0 MiB, 1,202 hits)

Slope

**Determine slope in slope-intercept form** (160.4 KiB, 766 hits)

**Determine slope from given graph** (2.1 MiB, 880 hits)

**Find the integer of unknown coordinate** (273.6 KiB, 902 hits)

**Find the fraction of unknown coordinate** (418.5 KiB, 921 hits)

Linear inequalities

**Graph of linear inequality** (2.8 MiB, 969 hits)