# Parallel and perpendicular lines?

Parallel and perpendicular line calculator: the lines through a point that are parallel and perpendicular to a given line, in slope-intercept and standard form, with the foot of the perpendicular and the distance.

- Page: https://www.acalculator.org/math/parallel-perpendicular-line-calculator
- JSON spec: https://www.acalculator.org/math/parallel-perpendicular-line-calculator.json
- Version: ec41f8911b78

## Default answer

Example with the default inputs (The line y = mx + b, Slope (m) 3, y-intercept (b) 6, Point x 3, Point y 0): Through (3, 0): parallel y = 3x − 9; perpendicular y = −(1/3)x + 1.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| given | The line | How you know the given line: its slope and y-intercept, two points on it, or Ax + By = C. |
| m | Slope (m) | The slope of the given line. |
| b | y-intercept (b) | Where the given line crosses the y axis. |
| x1 | x₁ | The x coordinate of a point on the given line. |
| y1 | y₁ | The y coordinate of that point. |
| x2 | x₂ | The x coordinate of a second point on the given line. |
| y2 | y₂ | The y coordinate of the second point. |
| A | A | The number in front of x in Ax + By = C. |
| B | B | The number in front of y in Ax + By = C. |
| C | C | The number on the right of Ax + By = C. |
| px | Point x | The x coordinate of the point the new lines pass through. |
| py | Point y | The y coordinate of the point the new lines pass through. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| lines | Parallel; perpendicular | The parallel line, then the perpendicular line, each through the point. |
| parallel | Parallel line | The line through the point with the same slope: y = mx + b, or x = c. |
| parallelStandard | Parallel line, standard form | The parallel line as Ax + By = C in whole numbers. |
| perpendicular | Perpendicular line | The line through the point with the negative reciprocal slope: y = mx + b, or x = c. |
| perpendicularStandard | Perpendicular line, standard form | The perpendicular line as Ax + By = C in whole numbers. |
| givenLine | Given line | The given line in slope-intercept form, or x = c when it is vertical. |
| slope | Slope of the given line | m, also the slope of the parallel line. None for a vertical line. |
| perpendicularSlope | Perpendicular slope | −1 ÷ m. None when the given line is horizontal or vertical. |
| foot | Foot of the perpendicular | Where the perpendicular line crosses the given line, exactly. |
| distance | Distance from the point to the line | The length from the point to the foot. |

## Method

Given line ax + by = c and point (p, q): parallel ax + by = ap + bq (slope m = −a/b); perpendicular bx − ay = bp − aq (slope −1/m); foot (p − ta, q − tb) with t = (ap + bq − c) ÷ (a² + b²); distance |ap + bq − c| ÷ √(a² + b²).

## Assumptions

- Every number is read exactly as typed: 0.1 is 1/10, so slopes, intercepts and the foot are exact fractions.
- A vertical line (x = c) has no slope; the line perpendicular to it is horizontal, and the reverse.

## Worked examples

1. given = slope, m = 3, b = 6, px = 3, py = 0 gives parallel = y = 3x − 9, perpendicular = y = −(1/3)x + 1, parallelStandard = 3x − y = 9, perpendicularStandard = x + 3y = 3, slope = 3, perpendicularSlope = -0.333333. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18), Example 19: the line parallel to f(x) = 3x + 6 through (3, 0) is g(x) = 3x − 9.
2. given = slope, m = 3, b = 1, px = 1, py = 7 gives parallel = y = 3x + 4, lines = y = 3x + 4; y = −(1/3)x + 22/3. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18), Writing Equations of Parallel Lines: f(x) = 3x + 1 through (1, 7) gives y = 3x + 4.
3. given = slope, m = 2, b = 4, px = 4, py = 0 gives perpendicular = y = −(1/2)x + 2, perpendicularSlope = -0.5, foot = (−4/5, 12/5). Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18), Writing Equations of Perpendicular Lines: f(x) = 2x + 4 and (4, 0) give y = −(1/2)x + 2.
4. given = points, x1 = -2, y1 = 6, x2 = 4, y2 = 5, px = 4, py = 5 gives perpendicular = y = 6x − 19, givenLine = y = −(1/6)x + 17/3, parallel = y = −(1/6)x + 17/3, slope = -0.166667, perpendicularSlope = 6, distance = 0. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18), Example 21: slope −1/6, perpendicular slope 6, y = 6x − 19.
5. given = standard, A = 2, B = 3, C = 6, px = 1, py = 1 gives parallel = y = −(2/3)x + 5/3, parallelStandard = 2x + 3y = 5, perpendicular = y = (3/2)x − 1/2, perpendicularStandard = 3x − 2y = 1, foot = (15/13, 16/13), distance = 0.27735. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18).
6. given = points, x1 = 2, y1 = 1, x2 = 2, y2 = 5, px = -1, py = 3 gives givenLine = x = 2, parallel = x = −1, perpendicular = y = 3, foot = (2, 3), distance = 3. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18).
7. given = slope, m = 0.5, b = -1.25, px = 0.1, py = 0.2 gives parallel = y = (1/2)x + 3/20, perpendicular = y = −2x + 2/5, perpendicularSlope = -2. Source: OpenStax, College Algebra 2e, §4.1 Linear Functions (parallel lines have the same slope; perpendicular slopes are negative reciprocals whose product is −1), https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions (retrieved 2026-10-18).

## FAQ

### How do you find a line parallel to a given line through a point?

Keep the slope and solve for the new intercept. For a line parallel to y = 3x + 6 through (3, 0): 0 = 3 × 3 + b, so b = −9 and the line is y = 3x − 9.

### How do you find a line perpendicular to a given line through a point?

Use the negative reciprocal of the slope, then solve for the intercept. y = 3x + 6 has slope 3, so a perpendicular line has slope −1/3. Through (3, 0): 0 = −(1/3) × 3 + b, so b = 1 and the line is y = −(1/3)x + 1.

### What are the slopes of perpendicular lines?

Their product is −1: each slope is the negative reciprocal of the other. Slopes 6 and −1/6 are perpendicular. A horizontal line (slope 0) is perpendicular to a vertical line, which has no slope.

### How can you tell if two lines are parallel?

They have the same slope and different y-intercepts. If the intercepts are also the same, the two equations describe the same line.

### What if the given line is vertical?

A vertical line x = c has no slope. A line parallel to it through (p, q) is x = p, and the perpendicular line is the horizontal line y = q.

### How do you find the distance from a point to a line?

Find where the perpendicular line through the point crosses the given line (the foot), then use the distance formula. For ax + by = c and the point (p, q) this is |ap + bq − c| ÷ √(a² + b²): from (1, 1) to 2x + 3y = 6 it is 1 ÷ √13 = 0.277.

## Sources

- OpenStax, College Algebra 2e, §4.1 Linear Functions: Determining Whether Lines are Parallel or Perpendicular; Writing Equations of Parallel Lines and of Perpendicular Lines; Examples 19, 20 and 21, retrieved 2026-10-18. https://openstax.org/books/college-algebra-2e/pages/4-1-linear-functions
- OpenStax, College Algebra 2e, §2.1 The Rectangular Coordinate Systems and Graphs: the distance formula d = √((x₂ − x₁)² + (y₂ − y₁)²), retrieved 2026-10-18. https://openstax.org/books/college-algebra-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs
- OpenStax, College Algebra 2e, §7.1 Systems of Linear Equations: Two Variables (two lines with different slopes meet at one point), retrieved 2026-10-18. https://openstax.org/books/college-algebra-2e/pages/7-1-systems-of-linear-equations-two-variables
