Linear Function

    • Introduction
    • What is a Linear Function?
    • Linear Function Equation
    • Real-Life Example of Linear Function
    • How to Find a Linear Function?
    • Identifying a Linear Function from Table
    • Graphing a Linear Function
    • Graphing a Linear Function by Finding Two Points
    • Graphing a Linear Function Using Slope and y-Intercept
    • Domain and Range of Linear Function
    • Inverse of a Linear Function
    • Piecewise Linear Function
    • Solved Examples
    • Practice Problems
    • Frequently Asked Questions

    Introduction

    A function is a relation where every input has one and only one output. If you have a function that doesn't have any variables with exponents, you're dealing with a linear function. A linear function represents a straight line on a coordinate plane. Sometimes, these functions can have more than one variable, however, the degree of the variables used cannot be more than `1`. In our article, we'll break down what exactly a linear function is, how to create a table and graph for it, the formulas to define it, what makes them unique, and give you some real-life examples to understand better.

     

    What Is a Linear Function?

    Linear functions are algebraic functions that show up as straight lines on a graph. It is a function with a maximum degree of `1` or `0`. It's written as `f(x) = mx + b`, where '`m`' is the slope (how steep the line is) and '`b`' is the `y`-intercept (the point where the line crosses the `y`-axis. '`x`' is the input value, and '`y`' (or `f(x)`) is what you get out. 

     

    Linear Function Equation

    A linear function equation is like the blueprint for drawing lines in math. Think of it as the basic recipe you follow to create straight lines on a graph. The main form of this equation is `f(x) = mx + b`, where '`m`' represents the slope of the line and '`b`' is where the line intersects the `y`-axis. The parent linear function is `f(x) = x`, which is a straight line passing through the origin (where `x` and `y` are both zero). Here are a few more examples to show you how different numbers in a linear function change the line's slope and intercept:

    • `f(x) = 4x - 3` (slope `= 4`, `y`-intercept `= -3`)
    • `f(x) = -2x + 1.5` (slope `= -2`, `y`-intercept `= 1.5`)
    • `f(x) = 2` (slope `= 0`, `y`-intercept `= 2`)

     

    Point-Slope Form and Standard Form of Linear Functions

    Point-Slope Form:

    • The point-slope form of a linear function is given as \( y - y_1 = m(x - x_1) \), where \( (x_1, y_1) \) is a point on the line, and \( m \) is the slope of the line.
    • This form is useful when you know the slope of the line and one point that lies on it.

     

    Standard Form:

    • The standard form of a linear function is expressed as \( Ax + By = C \), where \( A \), \( B \), and \( C \) are constants, and \( A \) and \( B \) are not both zero.
    • This form is helpful for easily identifying the intercepts (`x`-intercept and `y`-intercept) of the line.
    • It can also be useful for certain algebraic manipulations, such as solving systems of linear equations using elimination or substitution methods.

     

    How to Write a Linear Equation?

    To write a linear equation, we have two handy formulas: the slope-intercept form and the point-slope form. Let's walk through the process with a couple of examples.

    Example `1`: Write the equation of a line that has a slope of `-4` that passes through the point `(4,7)`.

    Solution:

    Step `1`: We use the slope value in the function `y = mx + b` to get `y = -4x + b`.

    Step `2`: We then plugin the given point to find the value of `b`.

    `y = -4x + b`

    `7 = -4(4) + b`

    `7 = -16 + b`

    `b = 23`

    So, our linear function equation is `f(x) = -4x + 23`.

     

    Example `2`: Write the equation of a straight line that passes through two points, `(-2, 10)` and `(3, 22)`.

    Solution:

    Step `1`: We start by finding the slope using the slope formula: `m = (y_2 - y_1) / (x_2 - x_1)`. For our points, the slope turns out to be `(22 - 10) / (3 - (-2)) = 12/5`.

    Step `2`: With the slope in hand, we plug it into the point-slope form: `y - y_1 = m(x - x_1)`. Using the point `(-2, 10)` it becomes `y - 10 = (12/5)(x - (-2))`.

    After simplifying, we get

    ` y - 10 = (12/5)(x + 2)`,

    `y - 10 = (12/5)x + (24/5)`

    `y = (12/5)x + (24/5) + 10`

    `y = (12/5)x + (74/5)`.

    So, our linear function equation is `f(x) = (12/5)x + (74/5)`.

     

    Identifying a Linear Function from a Table

    When it comes to figuring out if a function is linear, there are a couple of tricks we can use. If we're given a graph, it's pretty straightforward: if the graph is just a straight line, then we're dealing with a linear function. If we're given the function in an algebraic form, like `f(x) = mx + b`, we can tell it's linear because it is in the slope-intercept form.

    However, if we're faced with data in a table format and we're not sure if it represents a linear function, here's what we do:

    Step `1`. First, we find the differences between the `x`-values.

    Step `2`. Then, we find the differences between the `y`-values.

    Step `3`. Next, we check if the ratio of the difference in `y`-values to the difference in `x`-values stays the same for all the data points.

    Step `4`. If the difference remains the same, we conclude that the table represents a linear function.

    Let's walk through an example to see how it works.

    Example: We're given a table with `x` and `y` values. Does the table represent a linear function?

    Solution: 

    Let’s consider the first two rows. 

    Step `1`: The difference between `x` values is `2`.
    Step `2`: The difference between `y` values is `8`.

    Step `3`: The ratio of the difference in `y`-values to the difference in `x`-values is `8/2 = 4`.

    Now, let’s consider the last two rows. 

    Step `1`: The difference between `x` values is `2`.
    Step `2`: The difference between `y` values is `8`.

    Step `3`: The ratio of the difference in `y`-values to the difference in `x`-values is `8/2 = 4`.

    Likewise, we can see that the ratio of the difference in `y`-values to the difference in `x`-values is the same across any two consecutive rows.

    Step `4`: The table represents a linear function.

     

    Graphing a Linear Function

    When it comes to graphing a linear function, it's like plotting points on a map—you just need to find any two points on the line. Once you've got those, you can connect them with a straight line and keep it going in both directions. The graph of a linear function `f(x) = mx + b` behaves in different ways:

    • If '`m`' (the slope) is greater than `0`, the line goes up as you move from left to right.
    • If '`m`' is less than `0`, the line goes down as you move from left to right.
    • If '`m`' is equal to `0`, you get a horizontal line.

    Please note that a vertical line does not represent a linear function because there are multiple `y`-values for a given `x`-value.

    There are a couple of ways we can graph a linear function:

    `1`. Find any two points on the line and connect them with a straight line.

    `2`. Use the slope `(m)` and `y`-intercept `(b)` of the function to plot the line.

     

    Graphing a Linear Function by Finding Two Points

    Step `1`: Choose any two random values for '`x`' and plug them into the function `f(x) = mx + b`.

    For example, let's take `x = 1` and `x = 2`.

    Step `2`: Substitute these values into the function to find the corresponding '`y`' values.

    Using the function `f(x) = 3x + 5`,

    For `x = 1`, `y = 3(1) + 5 = 8`

    For `x = 2`, `y = 3(2) + 5 = 11`

    So, the points on the line are `(1, 8)` and `(2, 11)`.

    Step `3`: Plot these points on the graph and connect them with a straight line, extending it in both directions. 

     

    Graphing a Linear Function Using Slope and `y`-Intercept

    When it comes to graphing a linear function using its slope and `y`-intercept, it's like following a set of directions to draw a straight line on a graph. Let's break down the process using an example.

    Example: Graph the linear function `f(x) = 2x + 4`.

    Solution:

    Step `1`: Start by plotting the `y`-intercept.

    For our function, the `y`-intercept is `(0, 4)`, so we plot the point `(0, 4)` on the graph.

    Step `2`: Next, identify the slope '`m`' as a fraction `\text{rise}/\text{run}`.

    In our function, the slope is `2`, which is the same as `2/1`. So, rise is `2` and run is `1`.

    Step `3`: Now, move vertically up by the rising amount and horizontally to the right by the run amount from the `y`-intercept.

    From the `y`-intercept `(0, 4)`, we move up `2` units and right `1` unit to get a new point.

    Step `4`: Finally, connect the points from Step `1` and Step `3` with a straight line, and extend the line in both directions on the graph.

     

    Domain and Range of Linear Function

    The domain of a linear function refers to all the possible input values, or '`x`' values, that the function can take. For linear functions, this includes every real number. Similarly, the range of a linear function represents all the possible output values, or '`y`' values, that the function can produce. Again, for linear functions, this encompasses all real numbers as well.

    In simpler terms, if we look at the graph of a linear function like `f(x) = 3x - 2` or `g(x) = -2x + 5`, we'll notice that the function covers all the points on the graph for every possible '`x`' value along the `x`-axis, indicating that the domain is the set of all real numbers. Similarly, when we examine the `y`-values along the `y`-axis, we'll see that there's a point on the graph for every possible '`y`' value, demonstrating that the range is also the set of all real numbers.

    It's important to note that as long as the problem doesn't specify any particular restrictions on the domain or range, for linear functions, we can safely assume that both the domain and range include all real numbers. However, if the slope '`m`' of the linear function is `0`, indicating a horizontal line like `f(x) = 4`, then the range will only include one specific value (in this case, `4`), while the domain remains all real numbers. 

     

    Inverse of a Linear Function

    The inverse of a linear function is like flipping a function's behavior—it undoes what the original function does. For a linear function `f(x) = 2x - 3`, its inverse, denoted as `f^-1(x)`, is a function that satisfies the condition `f(f^-1(x)) = f^-1(f(x)) = x`. Let's walk through the process of finding the inverse of a linear function with an example.

    Step `1`: First, we rewrite the function with '`y`' instead of `f(x)`, like `y = 2x - 3`.

    Step `2`: Next, we swap the variables '`x`' and '`y`', giving us the equation `x = 2y - 3`.

    Step `3`: We then solve this equation for '`y`', getting `y = (x + 3)/2`.

    Step `4`: Finally, we replace '`y`' with `f^-1(x)` to get the inverse function, which is `f^-1(x) = (x + 3)/2`.

    It's interesting to note that the original function `f(x)` and its inverse `f^-1(x)` are always symmetrical with respect to the line `y = x`. This means that if we were to plot both the function and its inverse on a graph, they would reflect each other across the line `y = x`. Additionally, any point `(x, y)` on the graph of `f(x)` corresponds to the point `(y, x)` on the graph of `f^-1(x)`, and vice versa.

    For example, if `(-2, 1)` lies on the graph of `f(x)`, then `(1, -2)` will lie on the graph of `f^-1(x)`. This symmetry is visually apparent when we plot both the function and its inverse on the same graph.

     

    Piecewise Linear Function

    A piecewise linear function is a type of function where the definition changes across different sections of its domain. Instead of having a single rule for the entire domain, it is defined differently in various parts. Let's look at an example to understand this concept.

    Example: 

    Plotting a Piecewise Linear Function

    Consider the function \( f(x) \) defined as follows:

    \(f(x) = \begin{cases} 
    x + 2, & \text{if } x \in [-2, 1) \\
    2x - 3, & \text{if } x \in [1, 2]
    \end{cases}\)

    Solution:

    This function is linear within specific intervals of its domain. We'll determine the values of the function for the given intervals.

    When \( x \) belongs to the interval `[-2, 1)`:

    When \( x \) belongs to the interval `[1, 2]`:

     

    Real-Life Examples of Linear Function

    Linear functions show up in real life more often than you might think! Let's take a look at a couple of examples to see how they work outside of the math classroom.

    • Imagine you're subscribed to a movie streaming service that charges you a base fee of `$5` every month, plus an additional `$0.50` for each movie you download. So, your total monthly bill can be represented by the linear function `f(x) = 0.50x + 5`, where '`x`' stands for the number of movies you download in a month.
       
    • Now, let's switch gears to a t-shirt company. They have a one-time setup fee of `$60`, and then they charge `$8` for each t-shirt they print a logo on. This means the total cost depends on how many T-shirts you order. You can express this using the linear function `f(x) = 8x + 60`, where '`x`' is the number of t-shirts you want.
       
    • In the world of business, linear functions come into play when companies are trying to figure out how to make the most money or spend the least amount possible. They use linear programming problems, where the goal is to maximize profits or minimize costs, and they use linear functions to represent the objective they're trying to achieve.

     

    Solved Examples

    Example `1`: Find the slope and `y`-intercept of the linear function \( f(x) = 2x - 3 \).

    Solution:

    Given \( f(x) = 2x - 3 \), we can identify the slope \( m = 2 \) and the `y`-intercept \( b = -3 \).

     

    Example `2`: Determine the domain and range of the function \( g(x) = -4x + 7 \).

    Solution:

    For \( g(x) = -4x + 7 \), the domain is all real numbers \( (-\infty, \infty) \) and the range is also all real numbers \( (-\infty, \infty) \).

     

    Example `3`: For the piecewise linear function given below, find the value of `f(2)`.

    \(f(x) = \begin{cases} 
    x + 2, & \text{if } x \in [-2, 1) \\
    2x - 3, & \text{if } x \in [1, 3]
    \end{cases}\)

    Solution:

    `2` falls in the subdomain `[1,3]`. So, to find the value of `f(2)`, we need to plug in `x = 2` in the function `f(x) = 2x -3`. 

    `f(2) = 2(2) - 3`

    `f(2) = 1`

     

    Example `4`: Find the inverse of the function \( h(x) = 3x + 4 \).

    Solution:

    To find the inverse of \( h(x) = 3x + 4 \), we interchange \( x \) and \( y \), to get \( x = 3y + 4 \).

    Next, solve for \( y \) to obtain `y = \frac{x - 4}{3}`, which is the inverse function \( h^{-1}(x) \).

     

    Example `5`: Determine whether the following points lie on the graph of the linear function `f(x) = -\frac{1}{2}x + 3 : (-2, 4), (0, 3), (2, 2)`.

    Solution:

    For each point, substitute the `x`-value into the function and check if the resulting `y`-value matches the given `y`-coordinate:

    • For `(-2, 4): f(-2) = -\frac{1}{2}(-2) + 3 = 4` (matches)
       
    • For `(0, 3): f(0) = -\frac{1}{2}(0) + 3 = 3` (matches)
       
    • For `(2, 2): f(2) = -\frac{1}{2}(2) + 3 = 2` (matches)

    Thus, all points lie on the graph of the linear function `f(x) = -\frac{1}{2}x + 3`.

     

    Example `6`: The relationship between meters and feet is linear. Some equivalent values are shown in the table below. Find the linear function representing the given data.

    Solution:

    To find the linear function, consider any two points from the table.

    Let `(x_1, y_1) = (2, 6.56)` and `(x_2, y_2) = (4, 13.12)`.

    The slope, `m = (y_2 - y_1) / (x_2 - x_1) = (13.12 - 6.56) / (4 - 2) = 6.56 / 2 = 3.28`.

    Using the point-slope form,

    `y - y_1 = m (x - x_1)`

    `y - 6.56 = 3.28 (x - 2)`

    `y - 6.56 = 3.28x - 6.56`

    `y = 3.28x`

    From the table, the independent variable is meters `(\text{m})` and the dependent variable is feet `(\text{ft})`. So the linear relationship is Feet `(\text{ft}) = 3.28 ×` Meters `(\text{m})`.

    The linear relationship between meters and feet is Feet `(\text{ft}) = 3.28 ×` Meters `(\text{m})`.

     

    Practice Problems

    Q`1`. Identify the linear functions among the following. Select all that apply.

    1. \( f(x) = x^3 + 4x^2 - 3x + 1 \)
    2. \( f(x) = 2x^2 - 3x + 7 \)
    3. \( f(x) = 5x + 10 \)
    4. `f(x) = \frac{1}{3}x^3 - 4`

    Answer: c

     

    Q`2`. The relationship between the distance traveled and the time taken is linear. The following data is collected:

    What is the linear function representing the given data?

    1. \( T = 25d \)  
    2. \( T = 50d \)  
    3. \( T = 2.5d \)  
    4. \( T = 10d \)  

    Answer: a

     

    Frequently Asked Questions

    Q`1`. What is a linear function?

    Answer: A linear function is an algebraic function that can be represented by a straight line. In the slope-intercept form, a linear function is written as \( f(x) = mx + b \), where \( m \) is the slope of the line and \( b \) is the `y`-intercept.

     

    Q`2`. How do you graph a linear function?

    Answer: To graph a linear function, plot two points on the coordinate plane and draw a straight line passing through those points. You can also use the slope-intercept form \( y = mx + b \) to identify the `y`-intercept and slope, and then graph accordingly.

     

    Q`3`. What is the domain and range of a linear function?

    Answer: The domain of a linear function is all real numbers, as it extends infinitely in both directions along the `x`-axis. Similarly, the range of a linear function is also all real numbers, covering all possible values along the `y`-axis.

     

    Q`4`. How do you find the inverse of a linear function?

    Answer: To find the inverse of a linear function, swap the \( x \) and \( y \) in the equation, then solve for \( y \). The resulting equation represents the inverse function. However, note that a horizontal line (constant function) does not have an inverse.

     

    Q`5`. What are some real-life applications of linear functions?

    Answer: Linear functions are widely used in various real-life scenarios, such as calculating cost, revenue, and profit in business, modeling growth or decay in populations, analyzing rates of change in physics, and predicting trends in economics. They provide a simple and effective way to model relationships between variables.