Algebra • Linear Functions

Linear Function Evaluator

Evaluate f(x) = mx + b across real numbers and algebraic expressions. Derive exact inverse functions f⁻¹(x), construct domain-to-range value tables, and visualize Cartesian reflections across the diagonal identity line y = x.

|
Last Updated: September 2026
|
Verified Accurate: Mathematical & Computational Rigor
Function Analysis & Inverse Mapping

Linear Function Evaluator & Inverse Analyzer

Evaluate f(x) = mx + b, compute inverses f⁻¹(x), analyze rates of change, and compare reflections across y = x.

Accepts fractions or decimals
Value of f(0)
Target evaluation input
Evaluation Domain Range:
Target Value f(x)

5

f(4) = 2(4) − 3

Inverse Function

f⁻¹(x) = (x + 3)/2

f⁻¹(5) = 4

Root / Zero x₀

x = 1.5

(1.5, 0)

Monotonicity & Rate

Strictly Increasing

f'(x) = 2

Dual Cartesian Plot: f(x) vs Inverse f⁻¹(x)

Visualization of f(x) (solid purple), inverse f⁻¹(x) (dashed emerald), line of reflection y = x (dashed gray), and anchor points.

f(x) f⁻¹(x) y = x

Analytical Step-by-Step Derivations

Domain & Range Value Mapping Table

Input x f(x) = mx + b Inverse f⁻¹(x) Coordinate Pair
Direct Answer & Overview
Verified Educational Guide

How to Evaluate a Linear Function and Its Inverse

To evaluate a linear function f(x) = mx + b at an input value c, substitute c for x and compute m*c + b. The result is the dependent y-value located at coordinate (c, f(c)). Provided the slope m ≠ 0, the function is strictly monotonic and possesses a unique inverse function f⁻¹(x) = (x - b)/m, which reflects the graph symmetrically across the line y = x. The derivative f'(x) = m represents the constant marginal rate of change.

Primary Mathematical Formula Linear Functional Mapping, Inversion & Differentiation Model
Standard Equation
ƒ(x)
Q.E.D.
f(x)=mx+b,f−1(x)=x−bm  (m≠0),f′(x)=mf(x) = mx + b, \quad f^{-1}(x) = \frac{x - b}{m} \; (m \neq 0), \quad f'(x) = m
Defined for all real numbers x ∈ ℝ; inverse exists if and only if m ≠ 0
Exact Formula
Input Parameters
Required
1
Slope m: Constant rate of change (vertical rise over horizontal run)
2
Vertical Offset b: Initial functional value at zero input f(0)
3
Evaluation Argument x: Real number, rational fraction, or variable algebraic expression
Expected Outputs
Calculated
Evaluated Output f(x): Exact functional value at the target input coordinate
Inverse Function f⁻¹(x): Reflection across the identity line y = x with reciprocal slope 1/m
Root / Zero (x₀): Horizontal axis crossing coordinate (-b/m, 0) where f(x) = 0
Instantaneous Rate f'(x): Constant first derivative equal to the slope m
Worked Numerical Example
Instant Verification
Evaluate f(x) = 2x - 3 at x = 4, find its root, and calculate its inverse f⁻¹(x).
1 Evaluate function at x = 4: f(4) = 2(4) - 3 = 8 - 3 = 5 (Point: (4, 5))
2 Calculate function root (x-intercept): set 2x - 3 = 0 => 2x = 3 => x = 1.5 (Point: (1.5, 0))
3 Derive inverse formula: y = 2x - 3 => swap variables to x = 2y - 3 => solve for y = (x + 3)/2
4 State inverse function: f⁻¹(x) = 0.5x + 1.5
5 Verify reflection across y = x: f⁻¹(5) = (5 + 3)/2 = 8/2 = 4 (Reflected coordinate: (5, 4))
Result: f(4) = 5; Root: x = 1.5; Inverse: f⁻¹(x) = 0.5x + 1.5 (f⁻¹(5) = 4).

Linear Function Definition & Direct Evaluation Overview

In algebraic analysis, a linear function is a real-valued mapping f: ℝ → ℝ defined algebraically by the rule f(x) = mx + b, where m and b are fixed real constants. The parameter m represents the multiplicative rate of change (slope), while b specifies the additive vertical translation (the value assumed by the function when the input is zero, f(0) = b).

Unlike non-linear polynomials (such as quadratics or cubics whose rates of change depend continuously on the evaluation point), a linear function exhibits a perfectly constant gradient across its entire domain. Every unit increment in the independent variable x produces an exact, unchanging change of m units in the dependent value f(x).

Parameter / Property Algebraic Expression Geometric Meaning on Cartesian Plane Operational Significance
Direct Mapping f(x) = mx + b Straight line locus of coordinates (x, f(x)) Primary functional rule mapping input to output
Slope (Derivative) f'(x) = m Steepness and orientation (Δy / Δx) Constant marginal rate of change across domain
y-Intercept f(0) = b Vertical axis intersection coordinate (0, b) Initial value / baseline state at zero input
Zero / Root x₀ = −b / m Horizontal axis intersection coordinate (−b/m, 0) Threshold input where output completely vanishes
Inverse Function f⁻¹(x) = (x − b) / m Geometric reflection across diagonal line y = x Reciprocal mapping recovering original input from output

Algebraic Evaluation Mechanics: Numbers & Variable Arguments

Evaluating a linear function involves replacing the formal parameter x with a concrete numerical value, a rational fraction, or an algebraic expression. This operation adheres strictly to standard order of operations (multiplication precedes addition).

Scalar Evaluation

When given a real number c ∈ ℝ, simply compute:

f(c) = m · c + b

For example, given f(x) = 3x − 7, evaluating at c = −4 yields f(−4) = 3(−4) − 7 = −12 − 7 = −19. The corresponding Cartesian point is (−4, −19).

Algebraic Expression Evaluation

When evaluating f at a composite argument such as g(t) = 2t + 5, substitute the entire argument into x:

f(2t + 5) = m(2t + 5) + b = 2mt + 5m + b

Distribute slope m across all terms inside parentheses before combining like terms with the constant b.

For full two-variable equation manipulation and conversions between standard and slope-intercept form, utilize our Linear Equation Calculator. If you are solving an equation set to zero for an unknown, see the Single Variable Linear Equation Calculator.

Difference Quotient, Derivative & Constant Marginal Change

The difference quotient forms the bridge between intermediate algebra and differential calculus. It measures the average rate of change of a function over an interval of width h.

Analytical Derivation of the Difference Quotient

Let f(x) = mx + b. The difference quotient is defined as:

Q(x, h) = [f(x + h) − f(x)] / h

Q(x, h) = [(m(x + h) + b) − (mx + b)] / h

Q(x, h) = [mx + mh + b − mx − b] / h

Q(x, h) = [mh] / h = m   (for all h ≠ 0)

Because the width parameter h cancels out entirely, taking the limit as h → 0 yields the derivative directly without indeterminate limits:

f'(x) = limₙ→₀ [f(x + h) − f(x)] / h = m

This confirms that linear functions are the only polynomials whose instantaneous rate of change is completely constant across every point in their domain.

Invertibility, Bijectivity & Derivation of f⁻¹(x)

A function possesses a well-defined two-sided inverse if and only if it is a bijection: both injective (one-to-one, passing the Horizontal Line Test) and surjective (onto, covering the entire codomain).

The Invertibility Condition: m ≠ 0

For any linear function f(x) = mx + b:

  • If m ≠ 0, f is strictly monotonic (always increasing or always decreasing). It maps distinct inputs to distinct outputs, ensuring bijectivity across all real numbers ℝ. A unique inverse f⁻¹(x) always exists.
  • If m = 0, f(x) = b is a constant function. Every input produces the same output b. Because it is not one-to-one, no single-valued inverse function can exist.

Step-by-Step Derivation of the Inverse Function Formula

  1. Express as an equation in y: Write y = mx + b.
  2. Exchange input and output roles: Reflect across the line y = x by swapping x and y: x = my + b.
  3. Isolate the new dependent variable y: Subtract b from both sides: my = x − b.
  4. Divide by the slope m: Since m ≠ 0, divide both sides: y = (x − b) / m = (1/m)x − (b/m).
  5. Assign inverse notation: f⁻¹(x) = (1/m)x − (b/m).
Key Structural Insight: The slope of the inverse function is the exact reciprocal of the original slope: mᵢₙᵛ = 1 / m.

Cartesian Reflection Across the Line y = x

Geometrically, swapping x and y corresponds to an orthogonal reflection across the diagonal identity line y = x (the line passing through the origin at an angle of 45°).

Coordinate Swapping Property

If a coordinate point (u, v) satisfies f(u) = v, then the swapped coordinate (v, u) must lie on the graph of the inverse: f⁻¹(v) = u.

  • y-intercept of f(x) at (0, b) reflects to x-intercept of f⁻¹(x) at (b, 0).
  • x-intercept of f(x) at (−b/m, 0) reflects to y-intercept of f⁻¹(x) at (0, −b/m).

Fixed Points on the Identity Line

A fixed point occurs where the function output equals its input: f(x*) = x*. Solving mx* + b = x* yields (m − 1)x* = −b ⇒ x* = b / (1 − m) (for m ≠ 1).

At this coordinate (x*, x*), the graph of f(x), the inverse f⁻¹(x), and the identity line y = x all intersect simultaneously.

Monotonicity, Extrema & Asymptotic End Behavior

The sign of the slope m dictates the global behavior, monotonicity, and asymptotic growth of the linear function across ℝ.

m > 0: Strictly Increasing

For any x₁ < x₂, f(x₁) < f(x₂).

limₓ→+∞ f(x) = +∞
limₓ→−∞ f(x) = −∞
m < 0: Strictly Decreasing

For any x₁ < x₂, f(x₁) > f(x₂).

limₓ→+∞ f(x) = −∞
limₓ→−∞ f(x) = +∞
m = 0: Constant Function

For all x, f(x) = b. Zero slope.

limₓ→±∞ f(x) = b
Range = {b}

Because the derivative f'(x) = m never equals zero for non-constant functions, linear functions possess no local extrema (no local maxima or minima) on open intervals. On any closed interval [a, b], by the Extreme Value Theorem, the global maximum and minimum values occur strictly at the boundary endpoints a and b.

Constructing Domain Mapping Tables & Interpolation

A coordinate evaluation table (T-table) maps discrete samples from the continuous domain to their corresponding range outputs. In data science, engineering, and numerical mathematics, discrete tables enable:

  • Uniform Discretization: Sampling functions at uniform steps Δx = s, generating arithmetic progression sequences where each successive output satisfies yₒᵚ₁ = yₒ + m · s.
  • Linear Interpolation (Lerp): Estimating values between two tabulated points (x₀, y₀) and (x₁, y₁) via y = y₀ + [(x − x₀)/(x₁ − x₀)](y₁ − y₀).
  • Numerical Verification: Confirming that the ratio of first differences Δy / Δx remains strictly invariant across all adjacent rows.

Five Detailed Step-by-Step Worked Walkthroughs

Examine these comprehensive manual calculations covering diverse functional operations, inverse derivations, and composite expressions.

Worked Example 1: Function Evaluation with Fractional & Negative Coordinates

Scalar Evaluation

Problem: Given the linear function f(x) = −(4/5)x + 3, evaluate f(−10), f(0), and f(5/2).

Step 1: Evaluate at x = −10:

f(−10) = (−4/5)(−10) + 3 = (+40/5) + 3 = 8 + 3 = 11. Point: (−10, 11).

Step 2: Evaluate at x = 0 (y-intercept):

f(0) = (−4/5)(0) + 3 = 0 + 3 = 3. Point: (0, 3).

Step 3: Evaluate at x = 5/2:

f(5/2) = (−4/5)(5/2) + 3 = (−20/10) + 3 = −2 + 3 = 1. Point: (2.5, 1).

Final Answers: f(−10) = 11, f(0) = 3, f(5/2) = 1.

Worked Example 2: Deriving the Inverse Function & Verifying by Composition

Inverse Verification

Problem: Find the inverse of f(x) = (2/3)x − 4 and algebraically prove that f(f⁻¹(x)) = x.

Step 1: Write in terms of y: y = (2/3)x − 4.

Step 2: Swap variables: x = (2/3)y − 4.

Step 3: Solve for y: x + 4 = (2/3)y ⇒ y = (3/2)(x + 4) = (3/2)x + 6.

Step 4: State inverse function: f⁻¹(x) = 1.5x + 6.

Step 5: Verify composition:

f(f⁻¹(x)) = f((3/2)x + 6) = (2/3)[(3/2)x + 6] − 4

= (2/3)(3/2)x + (2/3)(6) − 4 = x + 4 − 4 = x.

Final Result: Verified! f⁻¹(x) = (3/2)x + 6.

Worked Example 3: Function Evaluation of Algebraic Arguments

Polynomial Composition

Problem: For f(x) = 5x − 2, find the simplified algebraic expression for f(3t − 4).

Step 1: Substitute argument into variable x:

f(3t − 4) = 5(3t − 4) − 2.

Step 2: Distribute slope 5:

5 · 3t − 5 · 4 − 2 = 15t − 20 − 2.

Step 3: Combine constant terms:

−20 − 2 = −22.

Final Result: f(3t − 4) = 15t − 22.

Worked Example 4: Difference Quotient Calculation

Calculus Foundations

Problem: Compute the difference quotient [f(x + h) − f(x)] / h for f(x) = −7x + 12.

Step 1: Expand f(x + h): f(x + h) = −7(x + h) + 12 = −7x − 7h + 12.

Step 2: Subtract f(x):

f(x + h) − f(x) = (−7x − 7h + 12) − (−7x + 12)

= −7x − 7h + 12 + 7x − 12 = −7h.

Step 3: Divide by h: (−7h) / h = −7 (for h ≠ 0).

Final Result: The difference quotient is identically −7.

Worked Example 5: Finding Root, Intercepts & Reflection Coordinates

Geometric Analysis

Problem: Determine the root, y-intercept, inverse function, and intersection point with y = x for f(x) = 4x − 9.

Step 1: y-intercept: f(0) = 4(0) − 9 = −9 ⇒ Coordinate (0, −9).

Step 2: Root (x-intercept): Set f(x) = 0 ⇒ 4x − 9 = 0 ⇒ 4x = 9 ⇒ x = 9/4 = 2.25 ⇒ Coordinate (2.25, 0).

Step 3: Inverse function: f⁻¹(x) = (x + 9) / 4 = 0.25x + 2.25.

Step 4: Intersection with line y = x: Set f(x) = x ⇒ 4x − 9 = x ⇒ 3x = 9 ⇒ x = 3.

When x = 3, f(3) = 4(3) − 9 = 3. Point of concurrency is (3, 3).

Final Result: Root is x = 2.25; Intersection with y = x is (3, 3).

Real-World Functional Models in Science, Finance & Engineering

Linear functions provide the foundational mathematical framework for scientific calibrations, financial amortizations, and physical force balances.

Temperature Conversion

Fahrenheit is a linear function of Celsius: F(C) = (9/5)C + 32. Inverting this function yields Celsius: C(F) = (5/9)(F − 32). The fixed point where F = C occurs at −40°.

Hooke's Elasticity Law

Restoring spring force within elastic limits follows F(x) = kx, where spring constant k is the slope. Inversion allows measuring displacement directly from detected force: x(F) = (1/k)F.

Asset Depreciation

Book value V(t) = V₀ − d · t decreases linearly over useful life t. The salvage value threshold defines the root t₀ where the asset is completely amortized.

Common Function Traps & Algebraic Verification Checklist

Avoid these frequent algebraic misunderstandings when evaluating functions and computing inverses:

Pitfall 1: Confusing Inverse Function f⁻¹(x) with Reciprocal 1/f(x)

The exponent notation −1 in f⁻¹(x) denotes functional inversion (undoing the operation), not the algebraic reciprocal [f(x)]⁻¹ = 1 / f(x). For example, if f(x) = 2x, f⁻¹(x) = x/2, whereas 1/f(x) = 1/(2x).

Pitfall 2: Attempting to Invert Constant Functions (m = 0)

If m = 0, f(x) = b fails the Horizontal Line Test. Trying to solve x = 0y + b yields division by zero: y = (x − b) / 0, which is undefined. Constant functions have no single-valued inverse.

Pitfall 3: Distributive Sign Errors in Arguments

When evaluating f(a − b) with a negative slope, remember that multiplying a negative by a negative produces a positive: −3(2 − x) = −6 + 3x, not −6 − 3x.

Step-by-Step Verification Checklist

  • Composition Test: Verify that f(f⁻¹(x)) = x and f⁻¹(f(x)) = x.
  • Coordinate Reflection Check: Pick a test point (x₀, y₀). Confirm that (y₀, x₀) satisfies the inverse function equation.
  • Slope Reciprocal Check: Confirm that the slope of f⁻¹(x) equals exactly 1/m.
  • Zero Check: Confirm that evaluating f at the root x₀ = −b/m yields exactly zero.
Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a linear function and how is it evaluated?
A linear function is a mathematical mapping of the form f(x) = mx + b, where m represents the constant rate of change (slope) and b represents the initial vertical offset (y-intercept at x = 0). To evaluate a linear function at a specific input value c, substitute c in place of the variable x and perform the arithmetic: f(c) = m*c + b.
How do you find the inverse of a linear function f(x) = mx + b?
To find the inverse function f^(-1)(x), replace f(x) with y: y = mx + b. Exchange the roles of x and y to reflect the graph across the identity line y = x: x = my + b. Solve explicitly for y: my = x - b, which yields y = (x - b) / m, or f^(-1)(x) = (1/m)x - (b/m). This inverse exists if and only if m != 0.
Why does a horizontal line f(x) = b have no inverse function?
A horizontal linear function has slope m = 0, meaning f(x) = b for every real number x. This function is not injective (it fails the Horizontal Line Test) because infinitely many distinct inputs map to the single output b. Consequently, reflecting it across y = x produces a vertical line x = b, which fails the Vertical Line Test and cannot be a single-valued function.
What is the derivative and difference quotient of a linear function?
The difference quotient of f(x) = mx + b is [f(x + h) - f(x)] / h = [m(x + h) + b - (mx + b)] / h = mh / h = m. Because this ratio is strictly independent of both x and h, the instantaneous rate of change (derivative) is everywhere constant: f’(x) = df/dx = m across all real numbers.
What is the domain and range of a linear function?
For any non-constant linear function (m != 0), both the domain and range span the entire set of real numbers: Domain = (-infinity, +infinity) and Range = (-infinity, +infinity). For a constant linear function (m = 0, f(x) = b), the domain remains all real numbers (-infinity, +infinity), but the range consists of the single-element set {b}.
How do you evaluate a linear function with an algebraic expression like f(2t + 1)?
To evaluate f(g(t)) where g(t) is an algebraic expression, substitute the entire expression into every occurrence of x in the definition of f. For f(x) = mx + b, evaluating at (2t + 1) yields f(2t + 1) = m(2t + 1) + b = 2mt + m + b.
What is the root or zero of a linear function and how is it calculated?
The root (or zero) of a function is the input value x where the output equals zero: f(x) = 0. For f(x) = mx + b with m != 0, setting mx + b = 0 gives mx = -b, which yields x = -b/m. Geometrically, this root corresponds to the x-intercept coordinate (-b/m, 0) on the Cartesian plane.
How does the slope m dictate the monotonicity of a linear function?
If m > 0, the function is strictly increasing across its entire domain, meaning f(x1) < f(x2) whenever x1 < x2. If m < 0, the function is strictly decreasing, meaning f(x1) > f(x2) whenever x1 < x2. If m = 0, the function is monotonic non-decreasing and non-increasing simultaneously (a constant function).
How do you verify that an inverse function f^(-1)(x) is mathematically correct?
Verify an inverse by calculating both function compositions: f(f^(-1)(x)) and f^(-1)(f(x)). If both simplify to the identity expression x for all x in the domain, the inverse is verified. For f(x) = mx + b and f^(-1)(x) = (x - b)/m: f(f^(-1)(x)) = m((x - b)/m) + b = (x - b) + b = x, and f^(-1)(f(x)) = (mx + b - b)/m = mx/m = x.
What is the geometric relationship between the graphs of f(x) and f^(-1)(x)?
The graph of f^(-1)(x) is the exact geometric reflection of f(x) across the diagonal identity line y = x. Every coordinate point (u, v) lying on the graph of f(x) corresponds to an inverted coordinate point (v, u) lying on the graph of f^(-1)(x). If the two lines intersect, their intersection point must lie on the line y = x.