# Home > Introduction to Pre-Calculus > Introduction to Graphing Functions > Linear Functions

# Linear Functions

A linear function is a straight line graph. Any straight line is given by one of two forms:

1. Gradient form: y = mx + c, where m is the gradient/slope of the function and c is the y-intercept
2. General form: ax + by + c = 0. This function has domain {all real x} and the range {all real y} where a and b are non-zero.

SKETCH THE FUNCTION f(x) = 2x + 1, STATE ITS DOMAIN AND RANGE.

Let y = f(x) = 2x + 1.

First, we have to find the x-intercept when y = 0.

So 2x + 1 = 0, gives x = – Next we have to find the y-intercept when x = 0.

So y = 2×0 + 1 = 1.

Thus the x and y intercepts are (- , 0) and (0, 1).

Now we need to find out if the function is odd or even.

f(x) = 2x + 1;  f(-x) = 2 x (-x) + 1 = -2x + 1.

This function is neither odd nor even.

With these two intercepts viz. (- , 0) and (0, 1), we can now draw the straight line. Domain: { all real x} and Range: { all real y}

There are two special types of linear functions, viz. horizontal lines and vertical lines.

### Horizontal line:

When x = 0 in ax + by + c = 0, we get by + c = 0, or

y = – This is a constant function that is parallel to the x-axis, and will be a horizontal line passing through – at y-axis. This type of function is called a horizontal line or constant horizontal linear function. The domain and range for horizontal linear function are:

Domain: {all real x}

Range: {y: y = – }, i.e. y is always – ### Vertical line:

When y = 0 in ax + by + c = 0, we get ax = -c, or

x = – This constant function is parallel to the y-axis, and will be a vertical line passing through – at x-axis. This type of function is called a vertical line or constant vertical linear function.

The domain and range for vertical linear function are:

Domain: {x: x = – }, i.e. x is always – Range: {all real y}

### In summary

x = a is a vertical line with x-intercept ‘a’

Domain: {x: x = a}

Range: {all real y}

y = b is a vertical line with y-intercept ‘b’

Domain: {all real x}

Range: {y: y = b}

### Remember

• A linear function will be odd if it passes through the origin (y-intercept = 0)
• A linear function will be even if even if it has only a constant (vertical lines only)
• A general linear function is neither odd or even