ForHosting KIT · Math

Line of intersection of two planes

Enter the coefficients of two planes and get the line where they meet, as a point and a direction: x+y+z and x−y+z, both set to 1, meet along the line through (0.5, 0, 0.5) heading (2, 0, −2). 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
A1
1
B1
1
C1
1
D1
-1
A2
1
B2
-1
You get
N1
1, 1, 1
N2
1, -1, 1
Direction
2, 0, -2
Dx
2

Two distinct planes in three-dimensional space either stay parallel and never meet, or cut each other along a unique straight line. Finding that line of intersection of two planes is a standard analytic-geometry task: the direction is the cross product of the two normal vectors, and any particular point that satisfies both Cartesian equations pins the parametric form r of t equals point plus t times direction. Students, CAD scripters, and graphics engineers meet the same eight coefficients over and over: a1, b1, c1, d1 for the first plane and a2, b2, c2, d2 for the second.

What the line of intersection is and how the formulas lock it

A plane in Cartesian form is the set of points r equals (x, y, z) that satisfy n · r plus d equals zero, where n is a non-zero normal vector. Write the first plane as a1 x plus b1 y plus c1 z plus d1 equals zero and the second as a2 x plus b2 y plus c2 z plus d2 equals zero.

Every vector that lies in the first plane is orthogonal to n1 equals (a1, b1, c1); every vector that lies in the second is orthogonal to n2 equals (a2, b2, c2). Therefore any direction that lies in both planes is orthogonal to both normals, which is exactly the geometric meaning of the cross product: the direction of the line of intersection is v equals n1 cross n2.

If that cross product is the zero vector, the normals are linearly dependent, the planes are parallel — including the coincident case where they are the same plane written twice — and there is no unique line to return. When the cross product is non-zero the two planes meet along one line, and the remaining task is to name a particular point on that line. This solver chooses the unique point on the line closest to the origin, which always lies in the span of n1 and n2.

Solving the two-by-two Gram system n1 · r0 equals minus d1 and n2 · r0 equals minus d2 for coefficients alpha and beta yields r0 equals alpha n1 plus beta n2. The Gram determinant equals the squared length of n1 cross n2 by the Lagrange identity, so a non-zero direction guarantees a unique closest point. The parametric line is then r of t equals r0 plus t times (n1 cross n2).

A classroom check is immediate: the planes x plus y plus z equals one and x minus y plus z equals one meet along r of t equals (one half, zero, one half) plus t times (two, zero, minus two). The xy-plane z equals zero and the xz-plane y equals zero meet along the x-axis. Every step is elementary vector algebra on eight scalars, so the result is deterministic, has no iteration, and never depends on the clock or a random seed.

Where a two-plane intersection calculator earns its keep

Classrooms and tutoring platforms use a line of intersection of two planes calculator so learners can check the parametric form for arbitrary coefficients without a sign error in the cross product or a missed case when the largest direction component is not z. Computer-aided design and solid-modeling scripts recover an edge from two adjacent faces given in implicit form, then feed the parametric line into a clipping or extrusion step.

Graphics and computational-geometry pipelines meet the same eight numbers when two clipping planes, two mirror planes, or two constraint planes are known and the shared hinge must be sampled. Failed validation does not consume balance, which keeps exploratory scripts cheap when users type parallel coefficients while learning the contract. Keep requests small, pin the rounded direction and point in tests, and you get a reproducible line for homework, LMS plugins, CAD helpers, and edge workers without standing up a computer-algebra system of your own.

Prefer this contract when both surfaces are already written as Cartesian planes; if you only have three points on each plane, fit the two implicit equations first, then call this solver. If you need the angle between the planes rather than their common line, that is a different search and a different calculator.

Analytic geometry homework and exam checks

Let students submit the eight coefficients of two Cartesian planes and verify the parametric line — direction n1 cross n2 and a point on both planes — against the textbook method.

Graphics and constraint hinges

Turn two clipping, mirror, or constraint planes into a parametric hinge line that shaders, ray tools, and solvers can evaluate without a computer-algebra package.

What form are the plane equations in?

The triples (a1,b1,c1) and (a2,b2,c2) are the normals; neither may be the zero vector.

Which point on the line does the solver return?

The unique point on the intersection line closest to the origin. It is the linear combination of the two normals that satisfies both plane equations, so the parametric form is canonical rather than dependent on which coordinate is set to zero.

What happens if the two planes are parallel?

There is no single line to return, so the calculation is refused with a message. That also covers the same plane written twice, because the cross product of the two normals is then the zero vector.

How is the direction of the line found?

It is the cross product of the two normal vectors, which are made of each plane's x, y and z coefficients. The normals (1, 1, 1) and (1, −1, 1) give the direction (2, 0, −2), which lies in both planes at once.

How can I check the result by hand?

Put the point into both plane equations. In the example the point (0.5, 0, 0.5) gives 0.5 + 0 + 0.5 in the first plane and 0.5 − 0 + 0.5 in the second: 1 in both, exactly what the two equations ask for.

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/math/line-of-intersection-of-two-planes

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/math/line-of-intersection-of-two-planes \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a1":1,"b1":1,"c1":1,"d1":-1,"a2":1,"b2":-1,"c2":1,"d2":-1}'
{
  "a1": 1,
  "b1": 1,
  "c1": 1,
  "d1": -1,
  "a2": 1,
  "b2": -1,
  "c2": 1,
  "d2": -1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.line_of_intersection_of_two_planes",
  "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.

max_abs1000000000000
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 calculator accepts those coefficients, rejects a zero normal or a parallel pair with invalid_input, and returns the direction vector together with the unique point on the line closest to the origin.

Input contract, response shape, and error behaviour

If a1, b1, and c1 are all zero, plane one is not a plane and the task is rejected; the same rule applies to plane two. The particular point is returned both as the array point and as scalars x0, y0, z0. Send a JSON body with eight required finite numbers: a1, b1, c1, d1 for the first plane a1 x plus b1 y plus c1 z plus d1 equals zero, and a2, b2, c2, d2 for the second plane written the same way. Each coefficient may arrive as a JSON number or as a numeric string; aliases n1x, n1y, n1z, plane1_d and the matching names for plane two are accepted. Missing fields, empty strings, non-finite values, and magnitudes above the published one-trillion ceiling fail with invalid_input naming the field. On success the body echoes the eight coefficients, restates the two normals as arrays n1 and n2, and returns direction as the raw cross product together with scalar components dx, dy, dz and direction_magnitude. Display strings include plane1 and plane2, the three parametric component equations parametric_x, parametric_y, and parametric_z, the vector form parametric_vector, a symmetric-form string, and a formula field documenting the closed forms. Pair the response with your own plotting code if you need a sketch; this endpoint solves for the line only and does not emit meshes or step-by-step prose beyond the formula field. Pricing is a flat $0.002 per successful request with unit item.

Where a two-plane intersection calculator earns its keep

Exam-prep generators need a deterministic oracle that marks parallel input as invalid instead of silently returning an empty success payload that a buggy grader might treat as a pass.

CAD edges from two implicit faces

Recover the shared edge of two adjacent planar faces given in a1x+b1y+c1z+d1=0 form, then sample r(t) for clipping, dimensioning, or extrusion.

How do I find the line of intersection of two planes?

Send the eight finite coefficients of a1x+b1y+c1z+d1=0 and a2x+b2y+c2z+d2=0. The API returns direction = n1 × n2 and the unique point on the line closest to the origin, plus parametric and symmetric strings.

What happens if the planes are parallel?

The task fails with invalid_input. When n1 × n2 is the zero vector the planes are parallel or coincident, so they do not determine a unique line of intersection and the call is not billed.

What does the line of intersection of two planes calculator cost?

The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →