ForHosting KIT · Math

Parallel or perpendicular lines

Slopes 2 and −0.5 multiply to −1, so the two lines are perpendicular and meet at 90 degrees. Enter two slopes, or mark one line as vertical, to learn whether the lines are parallel, perpendicular or neither, with the angle between them. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
M1
2
M2
-0.5
You get
Relation
perpendicular
Angle deg
90
Angle rad
1.5707963268
Product m1 m2
-1

Two lines in the plane are parallel when they never meet, and perpendicular when they meet at a right angle. With slopes those tests become simple algebra: equal slopes mean parallel lines, and a product of slopes equal to negative one means perpendicular lines. Students checking homework, contest solvers, CAD helpers, and game-map tools all need a stable answer for the relation and the acute angle between the lines, not only a sketch.

What parallel and perpendicular mean for slopes, and why people search for them

In Euclidean plane geometry a non-vertical line has a well-defined slope m equal to rise over run. Two lines with the same finite slope are parallel: they share direction and never meet. Two lines with finite slopes m1 and m2 are perpendicular when m1 times m2 equals negative one, which is the slope form of the right-angle condition.

The acute angle θ between two lines satisfies tan θ equals the absolute value of (m2 minus m1) divided by (one plus m1 times m2), with the special case that a zero denominator forces θ to ninety degrees. Search intent clusters around phrases such as parallel perpendicular lines, are these lines parallel, slope product negative one, angle between two lines calculator, and parallel or perpendicular from slopes.

Vertical lines have undefined slope, so this landing also accepts an explicit vertical flag for one line and still computes the angle against a finite partner slope.

Practical use, limits, pricing, and delivery channels

Use the browser tool when you want an immediate parallel-or-perpendicular check while reviewing homework, verifying a sketch, or confirming that two map roads meet at a right angle without installing a computer-algebra system. Slopes may be any finite numbers within a large absolute bound suitable for ordinary classroom and engineering figures; angles are returned in both degrees and radians with stable decimal rounding. Results are fully deterministic: the same slopes and flags always yield the same relation and angle fields.

There is no language model, no external geometry service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials. If you need midpoints, triangle solves, or distance between points, use those dedicated landings when they exist—this capacity focuses solely on the parallel, perpendicular, or neither relation and the acute angle from two line slopes.

Homework and exam slope drills

Students and graders confirm whether two given slopes are parallel, perpendicular, or neither, and read the acute angle without a local CAS.

What formula does the parallel perpendicular checker use?

Equal slopes mean parallel. A product of slopes equal to −1 means perpendicular. The acute angle is atan(|(m2−m1)/(1+m1·m2)|).

Is the parallel perpendicular line checker free?

The browser tool runs free on your device.

How do I represent a vertical line?

Set vertical1 or vertical2 to true and omit the corresponding finite slope. A vertical line is perpendicular to a horizontal line (slope zero) and never parallel to a non-vertical partner.

Is a vertical line perpendicular to a horizontal line?

Yes. Mark one line as vertical and give the other a slope of 0, and the result is perpendicular. A vertical line paired with any other slope is reported as neither, together with its angle.

What does a result of neither mean?

The lines cross, but not at a right angle. You still get the acute angle between them in degrees and radians, worked out from the difference of the two slopes.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geom/parallel-perpendicular

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geom/parallel-perpendicular \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m1":2,"m2":-0.5}'
{
  "m1": 2,
  "m2": -0.5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.parallel_perpendicular",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This capacity accepts two finite slopes m1 and m2, or marks a line vertical when slope is undefined, then returns relation as parallel, perpendicular, or neither together with angle_deg and angle_rad. If both lines are vertical the request fails with invalid_input so that degenerate case is never charged.

What parallel and perpendicular mean for slopes, and why people search for them

Delivering relation and both degree and radian measures as JSON makes the result easy to diff in continuous integration, feed into a larger pipeline, or copy into notes.

How this checker validates input and classifies parallel, perpendicular, or neither

After parsing, both-finite pairs are classified with a small epsilon: equal slopes yield relation parallel and angle zero; a product near negative one yields relation perpendicular and angle ninety degrees; otherwise relation is neither and the angle is the acute arctangent formula above. When exactly one line is vertical, the pair is perpendicular only if the other slope is zero (a horizontal line); otherwise relation is neither, and the angle is the absolute difference between ninety degrees and the arctangent of the finite slope. Send a JSON body with slopes m1 and m2 as finite numbers, or set vertical1 or vertical2 to true when that line is vertical. Each finite slope may be a JSON number or a numeric string. The engine rejects missing slopes when the corresponding vertical flag is false, rejects non-finite values, and rejects the case where both lines are vertical with invalid_input so those failed calls are not charged. The response echoes m1 and m2 (null when that side is vertical), both vertical flags, relation, angle_deg, angle_rad, product_m1_m2 when both slopes are finite, and method set to slope_angle so callers can assert the algorithm in tests. There is no matrix inversion, no external geometry service, and no diagram export—only slope algebra on a Worker isolate.

Practical use, limits, pricing, and delivery channels

Each successful request is one billable item at $0.002; failed validation does not consume balance. Wire the endpoint into contest answer checkers, road-grid validators, sprite orientation helpers, or preprocessing steps where you already prefer explicit slope tests over opaque black-box widgets that cannot explain why two vertical lines are rejected.

Deterministic fixtures for geometry tests

Pipelines that seed unit tests or interactive line demos can call a pure slope-relation oracle instead of reimplementing arctangent edge cases in every language.

Maps, CAD, and game road grids

Tools that validate grid roads, wall normals, or UI guides can recover relation and angle as structured JSON for import and regression checks.

How do I check if two lines are parallel or perpendicular with this API?

Send a JSON body with slopes m1 and m2 to geom.parallel_perpendicular. The response returns relation as parallel, perpendicular, or neither, plus angle_deg and angle_rad.

What happens if both lines are vertical?

The request fails with invalid_input because this checker requires at most one vertical line. Those validation failures are not charged.

Read the full KIT documentation →