Linear Function Solver

Identify, build and graph linear functions with AI-powered step-by-step working
Find the equation of the line through (2, 5) and (6, 13)
Is y = 5/x a linear function?
Find the linear function for the table x = 0,1,2,3 and y = 7,4,1,-2
Graph 2x + 3y = 6

What Makes a Function Linear

A linear function changes by the same amount for every equal step in xx. That constant rate of change is the slope, and it is what makes the graph a straight line.

The algebraic test is about the shape of the equation. Every variable must appear to the first power, alone, and never in a denominator or under a root:

EquationLinear?Reason
y=3x2y = 3x - 2yesdegree 1 in xx
2x+3y=62x + 3y = 6yesrearranges to y=223xy = 2 - \tfrac{2}{3}x
y=x2+1y = x^2 + 1noxx is squared
y=5xy = \dfrac{5}{x}noxx is in the denominator
y=xy+1y = xy + 1novariables multiplied together
y=5y = 5yesslope 0, a horizontal line

The numerical test is just as reliable: if equally spaced xx values give yy values with a constant first difference, the relationship is linear.

Three Forms, and How to Build the Equation

slope-intercept: y=mx+bpoint-slope: yy1=m(xx1)standard: Ax+By=C\text{slope-intercept: } y = mx + b \qquad \text{point-slope: } y - y_1 = m(x - x_1) \qquad \text{standard: } Ax + By = C

From two points, (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2):

  1. Slope m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1} — rise over run.
  2. Put mm and either point into point-slope form.
  3. Expand and rearrange into y=mx+by = mx + b.

From a table, the slope is the change in yy divided by the change in xx between consecutive rows, and bb is the yy value at x=0x = 0.

To graph y=mx+by = mx + b, plot (0,b)(0, b), then step 1 right and mm up (down if mm is negative) to get a second point, and draw the line through them. Slope written as a fraction is a ready-made instruction: m=23m = -\tfrac{2}{3} means down 2, right 3.

Common Mistakes to Avoid

  • Inverting the slope. It is ΔyΔx\frac{\Delta y}{\Delta x}, rise over run. Using run over rise gives the reciprocal, a different line.
  • Subtracting the coordinates in different orders. If the numerator is y2y1y_2 - y_1, the denominator must be x2x1x_2 - x_1 — the same point first in both.
  • Assuming bb is the last number you see. In 2x+3y=62x + 3y = 6 the intercept is y=2y = 2, not 6; you have to solve for yy first.
  • Confusing y=5y = 5 with x=5x = 5. The first is a horizontal line and a perfectly good linear function; the second is vertical, has undefined slope, and is not a function at all.
  • Calling a curve linear because it rises steadily. y=x2y = x^2 increases the whole way for x>0x > 0, but its first differences grow, so it is not linear.

示例题目

Step 1: Slope: m=13562=84=2m = \frac{13 - 5}{6 - 2} = \frac{8}{4} = 2.
Step 2: Point-slope with (2,5)(2, 5): y5=2(x2)y - 5 = 2(x - 2).
Step 3: Expand: y5=2x4y - 5 = 2x - 4.
Step 4: Solve for yy: y=2x+1y = 2x + 1.
Step 5: Check the second point: 2(6)+1=132(6) + 1 = 13
Answer: y=2x+1y = 2x + 1

Step 1: y=3x2y = 3x - 2: xx appears to the first power only — linear.
Step 2: y=x2+1y = x^2 + 1: xx is squared, so the first differences are not constant — not linear.
Step 3: y=5xy = \frac{5}{x}: xx sits in the denominator, i.e. 5x15x^{-1} — not linear.
Step 4: 2x+3y=62x + 3y = 6: solve for yy to get y=23x+2y = -\frac{2}{3}x + 2, degree 1 — linear.
Answer: y=3x2y = 3x - 2 and 2x+3y=62x + 3y = 6 are linear; the other two are not

Step 1: First differences in yy: 47=34 - 7 = -3, 14=31 - 4 = -3, 21=3-2 - 1 = -3. Constant, so the data is linear.
Step 2: xx increases by 1 each row, so the slope is m=31=3m = \frac{-3}{1} = -3.
Step 3: The yy value at x=0x = 0 is the intercept: b=7b = 7.
Step 4: Write it: y=3x+7y = -3x + 7.
Step 5: Check the last row: 3(3)+7=9+7=2-3(3) + 7 = -9 + 7 = -2
Answer: y=3x+7y = -3x + 7

常见问题

Every variable must appear to the first power, on its own, and never under a root or in a denominator. So 2x + 3y = 6 is linear while y = x squared, y = 5/x and y = xy are not. Numerically, equal steps in x must produce equal steps in y.

Yes. It is a horizontal line with slope 0, which is a perfectly valid constant rate of change. The vertical line x = 5 is different: its slope is undefined and it fails the vertical line test, so it is not a function at all.

Compute the slope as the difference in y divided by the difference in x, keeping the same point first in both subtractions. Then substitute that slope and either point into y - y1 = m(x - x1) and rearrange into y = mx + b. Verify by checking that the other point satisfies your equation.

It is the amount y changes for every one-unit increase in x. In a real context that is a rate: dollars per hour, kilometres per litre, degrees per minute. A negative slope means the quantity falls as x increases, and a slope of zero means it does not change.

相关求解器

相关学习指南

免费试用 AI-Math

任何数学问题都能获得分步解答。拍照上传或输入问题即可。

开始解题