Projection of Point Calculator

Find the perpendicular projection of any point easily. Analyze lines, segments, vectors, and distances precisely. Plot coordinates, compare values, and export results for records.

Calculator Inputs

For 2D mode, z-values are ignored and treated as zero automatically.

Plotly Graph

Example Data Table

Case Dimension Point P Point A Point B Object Projection Q Distance
Example 1 2D (4, 3) (1, 1) (5, 1) Line (4, 1) 2.0000
Example 2 2D (8, 4) (1, 1) (5, 1) Segment (5, 1) 4.2426
Example 3 3D (3, 4, 5) (0, 0, 0) (2, 0, 2) Line (4, 0, 4) 4.2426

Formula Used

Direction vector

d = B - A

Parameter of the orthogonal projection

t = ((P - A) · d) / (d · d)

Projected point on the infinite line

Q = A + t d

Clamping rules

For a segment, use t = min(1, max(0, t)).

For a ray, use t = max(0, t).

Perpendicular distance

distance = |P - Q|

This calculator also reports the scalar projection, vector projection, rejection vector, angle between AP and AB, and whether clamping was applied.

How to Use This Calculator

  1. Choose whether your geometry is 2D or 3D.
  2. Select the object type: infinite line, ray, or segment.
  3. Enter the coordinates for point P, the point you want projected.
  4. Enter point A and point B to define the direction.
  5. Set the number of decimal places for output formatting.
  6. Click Calculate Projection to display the results above the form.
  7. Review the projection point, distance, vectors, and parameter values.
  8. Use the CSV or PDF buttons to export the result table.

Frequently Asked Questions

1. What does projection of a point mean?

It is the closest point on a chosen line object to the original point. That closest point is reached by a perpendicular from the original point to the line, ray, or segment.

2. What is the difference between line, ray, and segment projection?

An infinite line extends forever in both directions. A ray starts at one endpoint and continues forward. A segment is limited between two endpoints. Segment and ray projections may clamp the answer to allowed bounds.

3. Why do I need two reference points A and B?

Points A and B define the direction vector of the target object. Without a valid direction, the projection cannot be computed. The calculator rejects cases where A and B are identical.

4. Can I use this for 3D geometry?

Yes. Switch the dimension to 3D and enter x, y, and z values for each point. In 2D mode, z-values are hidden and automatically treated as zero.

5. What does the parameter t represent?

The parameter t tells you where the projected point lies relative to vector AB. For a segment, values from 0 to 1 stay inside the segment. Other values fall outside and may be clamped.

6. What is the rejection vector?

The rejection vector is the difference between the original point and the projection point. Its magnitude equals the perpendicular distance from the point to the selected line object.

7. Why can the projected point equal A or B?

That usually happens when you project onto a segment or ray and the unconstrained projection lies outside the allowed range. The result is then clamped to the nearest valid endpoint.

8. What do the CSV and PDF options export?

They export the calculated result table shown above the form. The CSV is convenient for spreadsheets, while the PDF creates a shareable summary of metrics and computed coordinates.

Related Calculators

ellipse equation calculatordirectrix of parabolaplane equation calculatorreflection point calculatorsection formula calculatorline circle intersectioncentroid triangle calculatortangent to circletwo circles intersectionline equation 3d

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.