Write equations for the horizontal and vertical lines calculator

This calculator will find the equation of a line (in the slope-intercept, point-slope, and general forms) given two points or the slope and one point, with steps shown.

Related calculators: Slope Calculator, Parallel and Perpendicular Line Calculator

Solution

Your input: find the equation of a line given two points $$$P=\left(-4, 7\right)$$$ and $$$Q=\left(1, 2\right)$$$.

The slope of a line passing through the two points `P=(x_1, y_1)` and `Q=(x_2, y_2)` is given by `m=(y_2-y_1)/(x_2-x_1)`.

We have that $$$x_1=-4$$$, $$$y_1=7$$$, $$$x_2=1$$$, $$$y_2=2$$$.

Plug the given values into the formula for slope: $$$m=\frac{\left(2\right)-\left(7\right)}{\left(1\right)-\left(-4\right)}=\frac{-5}{5}=-1$$$.

Now, the y-intercept is `b=y_1-m*x_1` (or `b=y_2-m*x_2`, the result is the same).

$$$b=7-\left(-1\right) \cdot \left(-4\right)=3$$$.

Finally, the equation of the line can be written in the form `y=mx+b`.

$$$y=-x+3$$$.

Answer:

The slope of the line is $$$m=-1$$$.

The equation of the line in the slope-intercept form is $$$y=-x+3$$$.

The equation of the line in the point-slope form is $$$y - 7 = - (x + 4)$$$.

The equation of the line in the point-slope form is $$$y - 2 = - (x - 1)$$$.

The general equation of the line is $$$x + y - 3 = 0$$$.

Equation of Line Calculator is an online tool that helps to calculate the equation of a line. It uses the slope-intercept form of a line to provide an equation. Thus, we need to know the slope and the y-intercept of the line.

What is the Equation of Line Calculator?

Equation of Line Calculator helps you to compute the equation of a line when its slope and y-intercept are given. The equation of a line is represented by a linear equation given by y = mx + c. To use the equation of line calculator, enter the values of the slope and the intercept in the input boxes.

Equation of Line Calculator

NOTE: Enter the values upto three digits only.

How to Use Equation of Line Calculator?

Please follow the steps below to find the equation of the line using the equation of line calculator:

  • Step 1: Go to Cuemath's online equation of line calculator.
  • Step 2: Enter the slope(m) and intercept(c) in the given input box.
  • Step 3: Click on the "Solve" button to find the equation of the line.
  • Step 4: Click on the "Reset" button to clear the fields and enter different values.

How Does Equation of Line Calculator Work?

Write equations for the horizontal and vertical lines calculator

A straight line is formed when two points are joined and that segment is extended infinitely in both directions. The equation of a line is a function that is satisfied by all points lying on that line. Points that do not lie on this straight line will not satisfy this function. The degree of the equation of a straight line will always be 1. There are many methods to find the equation of a line depending upon the known parameters. These are point-slope form, two-point form, slope-intercept form, intercept form, and normal form. The slope-intercept form of the equation of a line is widely used as it is the easiest to work with. There are certain important terms associated with this form as given below:

  • Slope: The slope is used to define the steepness of a straight line with respect to a horizontal. The slope can be either positive or negative. It can also be defined as the change in the ratio of y-coordinates with respect to the x-coordinates.
  • Intercept: The point at which a line intersects or crosses the x or y-axis is known as the intercept. To determine the equation of a line using the slope-intercept form we need to know the y intercept.

Algebraically, a line is defined as a linear equation in two variables.

The equation of the line using the slope-intercept form is given by

y = mx + c

where m is the slope of a line, and c is the y-intercept

Write equations for the horizontal and vertical lines calculator

Want to find complex math solutions within seconds?

Use our free online calculator to solve challenging questions. With Cuemath, find solutions in simple and easy steps.

Book a Free Trial Class

Solved Examples on Equation of Line Calculator

Example 1:

Find the equation of a line if the slope is 5 and its intercept is 7. Verify it using the equation of line calculator.

Solution:

Given:Slope(m) = 5, Y-intercept = 7

Equation of the line: y = mx + c

y = 5x + 7

5x - y + 7 = 0

Therefore, equation of line is 5x - y + 7 = 0

Example 2:

Find the equation of a line if the slope is 20 and its intercept is 3. Verify it using the equation of line calculator.

Solution:

Given:Slope(m) = 20, Y-intercept = 3

Equation of the line: y = mx + c

y = 20x + 3

20x - y + 3 = 0

Therefore, equation of line is 20x - y + 3 = 0

Similarly, you can try the equation of line calculator to find the equation of the straight line for the following:

  • Slope = 12, and y-intercept = 7
  • Slope = 5, and y-intercept = 8
  • Equation of Line
  • Slope Intercept Form

☛ Math Calculators:

How do you write equations for horizontal and vertical lines?

Horizontal lines go left and right and are in the form of y = b, where b represents the y-intercept, while vertical lines go up and down and are in the form of x = a where a represents the shared x-coordinate of all points.

How do you write equations for vertical lines?

Similarly, in the graph of a vertical line, x only takes one value. Thus, the equation for a vertical line is x = a, where a is the value that x takes.

How do you write an equation for a horizontal line?

Step 1: A horizontal line has one y -value for all values of x in the domain. If this line passes through point (a,b) where a is the x -coordinate and b is the y -coordinate of the point, the horizontal line will have b as the y -value for all x . The equation to represent this horizontal line is y=b .