Calculator
Example Data Table
| Original info | Original gradient | Perpendicular gradient | Notes |
|---|---|---|---|
| Given slope m = 2 | 2 | -1/2 | Negative reciprocal rule applied. |
| Two points (1,2) and (5,8) | 1.5 | -0.6667 | m = (8−2)/(5−1) = 6/4 = 1.5 |
| Standard form 3x + 0y − 9 = 0 | Undefined | 0 | B = 0 gives a vertical line; perpendicular is horizontal. |
| Given slope m = 0 | 0 | Undefined | Horizontal line; perpendicular becomes vertical. |
Formula Used
- m = (y₂ − y₁) / (x₂ − x₁) for two points, if x₂ ≠ x₁.
- For Ax + By + C = 0, slope is m = −A/B when B ≠ 0.
- Perpendicular gradient rule: m⊥ = −1/m for finite, nonzero m.
- Special cases: horizontal (m = 0) ↔ vertical (undefined gradient).
How to Use This Calculator
- Select how you want to describe the original line.
- Enter the slope, points, or coefficients with consistent units.
- Choose decimal or fraction display, and set decimal places.
- Optionally enter a point to build a perpendicular line equation.
- Press Calculate to see the gradient above the form.
- Use the download buttons to save CSV or PDF results.
Article
1) What this gradient calculator finds
This tool calculates the gradient of a line perpendicular to a given line. Perpendicular lines intersect at 90°. The output helps you sketch the line, confirm geometry work, or set up an equation for graphs and coordinate problems.
2) Core rule: negative reciprocal
When a line has a finite, nonzero gradient m, the perpendicular gradient is m⊥ = −1/m. This works because perpendicular directions have slopes whose product is −1. Example: m = 4 gives m⊥ = −0.25, and m = −2/3 gives m⊥ = 3/2. If you invert a slope, also flip the sign to keep the 90° relationship, even for measured slopes.
3) Special cases: vertical and horizontal lines
A vertical line has undefined gradient since Δx = 0. Its perpendicular is horizontal, so the perpendicular gradient is 0. A horizontal line has gradient 0, and its perpendicular is vertical, so the perpendicular gradient is undefined. The calculator labels these clearly.
4) Three input options, same mathematics
Use the method that matches your data. With two points, the calculator uses m = (y₂ − y₁)/(x₂ − x₁). With standard form Ax + By + C = 0, it uses m = −A/B when B ≠ 0. After finding m, it applies the perpendicular rule. If x₂ = x₁, the line is vertical and the tool avoids dividing by zero.
5) Optional perpendicular line equation through a point
Enter a point (x₀, y₀) to get an equation for the perpendicular line. For finite gradients, it returns y − y₀ = m⊥(x − x₀). If the perpendicular is vertical, it returns x = x₀. This saves time when writing a final answer.
6) Rounding and fraction display
Choose decimal places to control rounding in the displayed gradients and equation. Fraction mode shows a rational approximation, which is helpful when a value like −0.6667 is easier to interpret as −2/3.
7) CSV and PDF exports for documentation
After you calculate, download a CSV or a simple PDF summary. Exports include the input method, original gradient, perpendicular gradient, and any generated equation. Keep them for homework checks, notes, or project records.
FAQs
1) Why do perpendicular gradients multiply to −1?
In the plane, a 90° rotation changes the direction so the slope becomes the negative reciprocal. For non‑vertical lines, m · m⊥ = −1 guarantees a right angle between the two lines.
2) What if the original line is vertical?
A vertical line has undefined gradient because Δx = 0. Its perpendicular is horizontal, so the perpendicular gradient is 0.
3) What if the original line is horizontal?
A horizontal line has gradient 0. The perpendicular must be vertical, so its gradient is undefined. The calculator labels this clearly as a vertical line case.
4) Can I use two points that share the same x‑value?
Yes, but that makes the original line vertical. When x₂ = x₁, the slope is undefined, and the perpendicular gradient becomes 0.
5) How do I get the perpendicular line equation through a point?
Enter x₀ and y₀. For finite gradients, the tool returns y − y₀ = m⊥(x − x₀). For vertical perpendicular lines, it returns x = x₀.
6) Which display format should I choose?
Use decimals for quick numeric work and plotting. Use fraction mode when you want cleaner exact‑style values, especially for classroom problems where slopes are usually rational numbers.