Equation of a Line Calculator

Find the Equation of a Line

Enter the required information to calculate the equation of a line in various forms.

Point 1 (x₁, y₁)
x₁
y₁
Point 2 (x₂, y₂)
x₂
y₂
Slope
m
Point (x, y)
x
y
Slope
m
Y-Intercept
b

How to Calculate the Equation of a Line

Calculating the equation of a line is a fundamental skill in algebra and coordinate geometry. Here's a comprehensive guide on how to find the equation of a line using different methods:

Line Equation Formulas

There are three common forms of a line equation:

  1. Slope-Intercept Form: \( y = mx + b \)
    • m is the slope of the line
    • b is the y-intercept (where the line crosses the y-axis)
  2. Point-Slope Form: \( y - y_1 = m(x - x_1) \)
    • (x₁, y₁) is a point on the line
    • m is the slope of the line
  3. Standard Form: \( Ax + By = C \)
    • A, B, and C are constants
    • A and B are not both zero

Calculation Steps

The steps to calculate the equation of a line depend on the given information:

Using Two Points

  1. Calculate the slope using the slope formula: \( m = \frac{y_2 - y_1}{x_2 - x_1} \)
  2. Use the point-slope form with one of the points: \( y - y_1 = m(x - x_1) \)
  3. Expand and simplify to get the slope-intercept form: \( y = mx + b \)

Using Slope and a Point

  1. Use the point-slope form: \( y - y_1 = m(x - x_1) \)
  2. Expand and simplify to get the slope-intercept form: \( y = mx + b \)

Using Slope and Y-Intercept

  1. The equation is already in slope-intercept form: \( y = mx + b \)
  2. Substitute the given values for m (slope) and b (y-intercept)

Example Calculation

Let's find the equation of a line passing through the points (1, 2) and (3, 6).

  1. Calculate the slope: \[ m = \frac{6 - 2}{3 - 1} = \frac{4}{2} = 2 \]
  2. Use the point-slope form with (1, 2): \[ y - 2 = 2(x - 1) \]
  3. Expand the equation: \[ y = 2x - 2 + 2 \]
  4. Simplify to get the slope-intercept form: \[ y = 2x \]

Visual Representation

A visual representation can help understand the concept better. Here's a diagram showing the line y = 2x passing through the points (1, 2) and (3, 6):

x y 2 4 6 2 4 6 P₁(1, 2) P₂(3, 6) Δx = 2 Δy = 4 y = 2x slope = Δy/Δx = 4/2 = 2

This diagram illustrates how the line y = 2x passes through the points (1, 2) and (3, 6), confirming our calculated equation.