Coordinate Geometry Formulas and Solved Examples
Distance formula, slope, section formula, line equations, and area of triangle from coordinates with worked examples for placement aptitude tests.
Coordinate geometry converts geometric problems into algebra by assigning every point a pair of numbers on a plane. For placement aptitude rounds, that means most questions reduce to plugging coordinates into 5 or 6 standard formulas and simplifying.
This article covers every formula that appears in campus placement evaluation tests, verifies each one with worked arithmetic, and ends with multi-step problems of the type you’ll see in TCS NQT, AMCAT, and Cocubes quantitative sections.
Core Formulas: Distance, Midpoint, and Section
Distance Formula
The distance between two points (x1, y1) and (x2, y2) is:
d = sqrt[(x2 - x1)^2 + (y2 - y1)^2]
This is the Pythagorean theorem applied to horizontal and vertical differences. According to the NCERT Class 11 textbook on Straight Lines, the derivation follows directly from constructing a right triangle between the two points.
Worked example:
- Points:
(2, 3)and(7, 15) - Horizontal difference:
7 - 2 = 5 - Vertical difference:
15 - 3 = 12 - Distance:
sqrt(5^2 + 12^2) = sqrt(25 + 144) = sqrt(169) = 13
The pair (5, 12, 13) is a Pythagorean triplet. Recognising these saves time in timed tests.
Midpoint Formula
The midpoint of a segment joining (x1, y1) and (x2, y2) is:
M = ((x1 + x2)/2, (y1 + y2)/2)
Worked example:
- Points:
(4, 6)and(10, 2) - Midpoint:
((4 + 10)/2, (6 + 2)/2) = (7, 4)
Section Formula (Internal Division)
A point dividing the segment from (x1, y1) to (x2, y2) in ratio m:n internally:
P = ((mx2 + nx1)/(m + n), (my2 + ny1)/(m + n))
Worked example:
- Points:
(3, 5)and(11, 8), ratio5:2internally - x-coordinate:
(5*11 + 2*3)/(5 + 2) = (55 + 6)/7 = 61/7 - y-coordinate:
(5*8 + 2*5)/(5 + 2) = (40 + 10)/7 = 50/7 - Result:
(61/7, 50/7)
Section Formula (External Division)
For external division in ratio m:n:
P = ((mx2 - nx1)/(m - n), (my2 - ny1)/(m - n))
Worked example (same points, ratio 5:2 externally):
- x-coordinate:
(5*11 - 2*3)/(5 - 2) = (55 - 6)/3 = 49/3 - y-coordinate:
(5*8 - 2*5)/(5 - 2) = (40 - 10)/3 = 30/3 = 10 - Result:
(49/3, 10)
Slope and Conditions for Parallel and Perpendicular Lines
Slope of a Line
The slope of a line through (x1, y1) and (x2, y2) is:
m = (y2 - y1)/(x2 - x1)
Slope is undefined when x2 = x1 (vertical line). A horizontal line has slope 0.
Parallel and Perpendicular Conditions
- Two lines are parallel when
m1 = m2 - Two lines are perpendicular when
m1 * m2 = -1
Quick check: if one line has slope 3/4, a perpendicular line has slope -4/3. Multiply: (3/4) * (-4/3) = -1. Confirmed.
Angle Between Two Lines
The acute angle between two lines with slopes m1 and m2:
tan(theta) = |(m1 - m2)/(1 + m1*m2)|
This formula breaks down (gives undefined) when 1 + m1*m2 = 0, which is exactly the perpendicular case. That’s a useful consistency check in tests.
Equations of a Line
There are 3 standard forms you’ll use in aptitude rounds. Each fits a different “given” scenario. As covered in Khan Academy’s analytic geometry module, converting between forms is a frequent exam task.
Slope-Intercept Form
y = mx + c
Use when you know the slope and y-intercept directly.
Point-Slope Form
y - y1 = m(x - x1)
Use when you know the slope and one point on the line.
Worked example:
- Slope:
2/3, point:(2, 3) - Equation:
y - 3 = (2/3)(x - 2) - Multiply through by 3:
3y - 9 = 2x - 4 - Rearranged:
2x - 3y + 5 = 0
Two-Point Form
Given points (x1, y1) and (x2, y2):
(y - y1)/(y2 - y1) = (x - x1)/(x2 - x1)
This is point-slope form with the slope substituted in.
Perpendicular Line Example
- Given line:
3x + 2y + 4 = 0 - Slope of given line:
-3/2(rearrange toy = (-3/2)x - 2) - Perpendicular slope:
2/3(negative reciprocal) - Through point
(2, 3):y - 3 = (2/3)(x - 2) - Simplify:
3y - 9 = 2x - 4, so2x - 3y + 5 = 0
Verification: slopes are -3/2 and 2/3. Product: (-3/2)(2/3) = -1. Perpendicularity confirmed.
Area of a Triangle from Coordinates
Given vertices (x1, y1), (x2, y2), (x3, y3):
Area = (1/2)|x1(y2 - y3) + x2(y3 - y1) + x3(y1 - y2)|
The absolute value ensures area is non-negative. If the result is zero, the three points are collinear.
Worked example:
- Vertices:
(1, 2),(4, 6),(7, 2) - Calculation:
(1/2)|1*(6 - 2) + 4*(2 - 2) + 7*(2 - 6)| - Expand:
(1/2)|1*4 + 4*0 + 7*(-4)| - Simplify:
(1/2)|4 + 0 - 28| = (1/2)*|-24| = (1/2)*24 = 12 - Area: 12 square units
Collinearity Check
- Points:
(1, 1),(3, 3),(5, 5) - Area:
(1/2)|1*(3 - 5) + 3*(5 - 1) + 5*(1 - 3)| - Expand:
(1/2)|1*(-2) + 3*4 + 5*(-2)| = (1/2)|-2 + 12 - 10| = (1/2)*0 = 0 - Area is zero, so the points are collinear (they all lie on
y = x)
Worked Examples for Placement Aptitude
These are multi-step problems combining 2 or more formulas. The difficulty level matches what appears in time and work aptitude questions sections of campus drives.
Problem 1: Triangle Median Length
- Given: Triangle with vertices
A(0, 0),B(6, 0),C(3, 6) - Find: Length of the median from C to side AB
- Step 1: Midpoint of AB =
((0+6)/2, (0+0)/2) = (3, 0) - Step 2: Distance from
C(3, 6)to midpoint(3, 0)=sqrt((3-3)^2 + (6-0)^2) = sqrt(0 + 36) = 6 - Answer: The median from C has length 6 units
Problem 2: Line Through Intersection
- Given: Find the equation of a line through the point
(1, 2)and parallel to4x - 3y + 7 = 0 - Step 1: Slope of
4x - 3y + 7 = 0is4/3(rearrange:y = (4/3)x + 7/3) - Step 2: Parallel line has the same slope:
4/3 - Step 3: Point-slope form:
y - 2 = (4/3)(x - 1) - Step 4: Multiply by 3:
3y - 6 = 4x - 4 - Step 5: Rearrange:
4x - 3y + 2 = 0 - Answer:
4x - 3y + 2 = 0
Problem 3: Perpendicular Distance
- Given: Find the perpendicular distance from point
(3, 4)to line3x + 4y - 5 = 0 - Formula:
d = |ax1 + by1 + c|/sqrt(a^2 + b^2) - Substitution:
d = |3*3 + 4*4 - 5|/sqrt(9 + 16) = |9 + 16 - 5|/sqrt(25) = |20|/5 = 4 - Answer: 4 units
The formula pattern across all three problems is consistent: identify what’s given, pick the right formula, substitute, simplify. For placement preparation books that cover these topics in depth, R.S. Aggarwal’s Quantitative Aptitude dedicates 2 chapters to coordinate geometry with 100-plus practice problems at this difficulty level.
Bridge to Analytical Thinking
Every problem above follows the same structure: translate a geometric question into coordinates, apply an algebraic formula, verify the arithmetic. That systematic breakdown is exactly how structured learning works in any technical domain. If you found the step-by-step pattern in the perpendicular-distance problem (Problem 3 above) satisfying, TinkerLLM applies the same decomposition approach to building with large language models. It costs ₹299 to start, and the problems scale from single-formula to multi-step just like the progression in this article.
Primary sources
Frequently asked questions
What is the difference between internal and external division in the section formula?
Internal division places the dividing point between the two endpoints. External division places it on the extended line beyond one endpoint. The formulas differ by a sign: internal uses (mx2 + nx1)/(m + n), external uses (mx2 - nx1)/(m - n).
How do you find the equation of a line perpendicular to a given line?
First find the slope of the given line. The perpendicular line's slope is the negative reciprocal (flip the fraction and change the sign). Then apply point-slope form using the perpendicular slope and the point the new line passes through.
Can you check collinearity using the area formula?
Yes. If the area of the triangle formed by three points equals zero, the points are collinear. Plug the three coordinate pairs into the determinant formula and check whether the result is zero.
What is the slope of a vertical line?
A vertical line has an undefined slope because the denominator (x2 - x1) equals zero. You cannot divide by zero, so the slope does not exist as a real number. The equation of a vertical line is written as x = constant.
Which coordinate geometry topics appear most in TCS NQT and AMCAT?
Distance between two points, slope calculations, finding line equations, and section formula problems appear most frequently. Area-of-triangle questions and perpendicular-distance problems show up less often but carry higher marks when they do.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)