Linear function with slope -2 - graph and intercepts

    Two coefficients define a straight line. Enter slope a and intercept b to get the equation, x-intercept (zero), y-intercept, and whether the function is increasing or decreasing.

    A linear function with slope a = -2 means the line rises (or falls) by -2 units for every 1 unit along the x-axis. The equation y = -2x + b defines a straight line whose y-intercept depends on b. Enter the b coefficient to see the graph, intercepts and angle with the x-axis.

    Parameters

    Enter data for calculations

    The slope - cannot be 0

    Where the line crosses the y-axis

    Form progress0 / 2 fields

    💡 Fill in all required fields to unlock the calculate button

    The simplest function that still tells a story

    A linear function f(x) = ax + b produces a straight line on any graph. Two numbers - the slope a and the y-intercept b - are enough to pin down every property of that line: where it crosses both axes, how steep it is, and whether it climbs or falls. This calculator extracts all four key facts from those two coefficients.

    Quick start
    Enter a = 3, b = -6. Result: f(x) = 3x + (-6). Zero at x = 2. Y-intercept at (0, -6). The function is increasing because a > 0.

    Key formulas

    Equation: f(x) = ax + b (slope-intercept form)

    X-intercept (zero): x0 = -b / a (solve ax + b = 0)

    Y-intercept: (0, b) - just read coefficient b

    Slope: a > 0 = increasing, a < 0 = decreasing

    Slope reference table

    Slope (a) Meaning Real-world analogy
    a = 0.5 Gentle rise Wheelchair ramp (1:12 ratio = a = 0.08)
    a = 1 45-degree angle 1 unit up for every 1 unit right
    a = 3 Steep rise Aggressive stock price trend
    a = -1 45-degree downhill Phone battery draining steadily
    a = -0.1 Gentle decline Slow depreciation of equipment

    Practical examples

    Taxi fare: Base fare $3.50, plus $2.10 per mile. f(x) = 2.10x + 3.50. Zero at x = -1.67 (no practical meaning - you can't drive negative miles). At 5 miles: f(5) = $14.00. The slope $2.10/mile is the rate you care about.
    The slope is the per-unit cost, b is the fixed cost
    Temperature conversion: Celsius to Fahrenheit: F(C) = 1.8C + 32. Zero at C = -17.78 (where Fahrenheit also gives a round negative number). Y-intercept: 32 (freezing point of water in Fahrenheit).
    The classic linear function from physics class
    Depreciation: A laptop worth $1200 loses $200/year in value. f(t) = -200t + 1200. Zero at t = 6 years (fully depreciated). After 3 years: f(3) = $600. Negative slope = decreasing value over time.
    Straight-line depreciation is literally a linear function
    Water tank: A tank drains at 15 liters/minute from an initial 450 liters. f(t) = -15t + 450. Zero at t = 30 minutes (tank empty). After 10 min: 300 liters remain.
    The zero tells you when the resource runs out
    Break-even analysis: Revenue R(x) = 25x, Cost C(x) = 15x + 500. Profit P(x) = R - C = 10x - 500. Zero at x = 50 units. You need to sell 50 units to break even. Below 50: loss. Above 50: profit.
    The x-intercept is the break-even point

    Linear vs quadratic - when to use which

    Property Linear f(x) = ax + b Quadratic f(x) = ax2 + bx + c
    Graph shape Straight line Parabola (curve)
    Rate of change Constant Varies with x
    Max zeros 1 2
    Has vertex No Yes (min or max)
    Use case Constant rate (taxi, depreciation) Acceleration, area, optimization

    FAQ

    What if a = 0?
    When a = 0, f(x) = b for all x - a horizontal line with no slope. This is a constant function, not a linear function. It has no x-intercept (unless b = 0, in which case it lies on the x-axis entirely). The calculator returns an error because the zero formula -b/a would divide by zero.
    What is the difference between slope and rate of change?
    For a linear function, they are the same thing. The slope a tells you how much f(x) changes when x increases by 1. If a = 3, every unit increase in x adds 3 to f(x). In calculus, the derivative of ax + b is simply a - the slope is constant everywhere on the line.
    How do I find the slope from two points?
    Given points (x1, y1) and (x2, y2), the slope is a = (y2 - y1) / (x2 - x1). Then b = y1 - a*x1. Example: points (1, 5) and (3, 11). Slope = (11 - 5)/(3 - 1) = 6/2 = 3. Then b = 5 - 3*1 = 2. So f(x) = 3x + 2.
    Can a linear function have no zero?
    Every linear function with a non-zero slope crosses the x-axis exactly once. The zero always exists at x = -b/a. The only case with "no zero" is the constant function f(x) = b (a = 0, b non-zero), which is a horizontal line that never touches the x-axis. But that is not a linear function by the strict definition.
    What does f(x) = mx + b look like in other notations?
    The same line can be written as: slope-intercept y = mx + b, standard form Ax + By = C, point-slope y - y1 = m(x - x1), or parametric (x, y) = (x1, y1) + t(1, m). All describe the same line. This calculator uses slope-intercept form because it directly reveals the slope and y-intercept.
    How is this related to systems of linear equations?
    A system of two linear equations asks: where do two lines intersect? If the slopes differ (a1 != a2), there is exactly one intersection point. If slopes are equal but intercepts differ, the lines are parallel (no solution). If both are equal, the lines overlap (infinite solutions). Solving the system means finding the x where both functions give the same y.

    Related tools

    Quadratic Function Calculator

    When the relationship is not straight - parabolas, vertex, discriminant - Open calculator

    Coordinate Calculator

    Find the distance between two points on your line, or the midpoint of a segment - Open calculator

    Proportion Calculator

    Direct proportionality y = kx is a linear function through the origin (b = 0) - Open calculator

    Percentage Calculator

    Percentage increase is a linear operation: new = old + old * rate = old * (1 + rate) - Open calculator

    Calculator verified by the LiczGrupa.pl team

    Content, formulas and results have been reviewed for accuracy and relevance by our team of specialists.

    Natalia Skrzek

    Reviewed by: Natalia Skrzek