Latest Tweets

Free math worksheets

Linear function, coordinates, slope, graphing of linear inequality

linear function

What is a function? A function is a correspondence between two sets so there is exactly one element from the second set assigned to each element from the first set.

This sounds a bit complicated, so let’s simplify it. You have two sets of things.
Set A is a set of 4 triangles and the set B is a set of 3 squares.

two set of different objects

A function f : A -> B (read function from A to B) is an operation in which every triangle joins exactly one square.

explanation of a function

It would have also been a function even if two triangles would share one square, but not the other way around.

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.

four quadrants of cartesian plane

Their intersection will be marked with 0, 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. First is upper right, second upper left, third down left, and forth down right.

Linear function is a function given by a rule f(x) = a * 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 1: Draw a graph of: f(x) = 2x
First you have to make your dependant/independant variable table.

dependent and independent variable table

This is how it will usually looks like. You only need 2 points to make a line, but for precise in drawings, we’ll take 3. The usual values for x are -1, 0 and 1.

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

filled variable table

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?

simple function graph

(-1, -2): So, -1 is on the x – axis. So we put a straight vertical line trough -1, and -2 is on the y, so we put a straight horizontal line trough -2 on y-axis. Their intersection is the point we are looking for. Do to the same to remaining two points, and simply draw a line that goes trough those three points.

The number infront of x indicates the slope of your line.



The slope of a line is a number that describes steepness and direction of the line. A slope (m) is calculated by the formula:

calculate slope formula

In this formula x_1, y_1 and x_2, y_2 are any two points on that line.
If it’s positive the line will go trough first and third quadrant, and if it’s negative trough second and forth.

If the slope is equal to 0, then the line will be paralel so x – axis. Y = c
If 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 m1=-1/m2 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 ‘m’.

\ m = \frac{y_1 - y_2}{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 2: Draw a graph of : \ f (x) = - 2x

Again, first we draw the table:

f(x) = -2x

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

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

f(1) = -2 * 1 = - 2
example of variable table

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

random function graph

Example 3: 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:

graph of 1/2x

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. Same goes for negative one.

Affine function

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

Let’s compare it with linear function : f(x) = ax. The only thing different is that b. 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 1: 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 exactly 4. Second one is the same as we used to draw linear functions.variable table of function x4graph of x+4

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. Y is equivalent to f(x).

Example 2: Draw a graph of: y + 0.2x + 2 = 0

Y = 0.5x - 2
f (x) = -0.5x - 2
f (x) = -0.5x - 2 = -\frac{1}{2}x - 2

variable table of 1/2x + 2

graph of function -0.5x-2

Example: If you know that the slope of your line is equal 2, and it goes through (1, 1) and (x2,2 ). Find X2 coordinates.

calculate using slope formula

Analog for any other coordinate.

Graph of linear inequality

Graph of linear inequality will firstly be drawn exactly like linear or affine function, set of solutions here will be if:

  • f(x) > ax + c area above the graph (graph not included)
  • f(x) < ax + c – area under the graph (graph not included)
  • f(x) \ge  ax + c – area above the graph (graph included)
  • f(x) \le ax + c –area under the graph (graph included)

Example: Draw the graph of f(x) \ge  2x - 1

The solution set will be all points in area above the graph, with graph included.

First you solve it like f(x) = 2x - 1, and then mark solutions.

graphing linear inequality



Linear function

  Linear functions - Point-slope form (161.7 KiB, 276 hits)

  Linear function - Slope-intercept form (208.7 KiB, 354 hits)

  Linear functions - Standard form (972.7 KiB, 292 hits)

  Graphing linear functions (2.0 MiB, 427 hits)


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

  Determine slope from given graph (2.1 MiB, 264 hits)

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

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

Linear inequalities

  Graph of linear inequality (2.8 MiB, 263 hits)