3D Distance Formula: Distance Formula in 3D calculates the distance between two points, a point and a line, and a point and a plane in three-dimensional coordinates as well as a two-dimensional Cartesian Plane.3D geometry comes into the picture to model real-world quantities such as velocity, fluid flows, electrical signals, and many other
3D geometry deals with three coordinate points represented using three coordinate axes namely x, y, and z which are mutually perpendicular. In 3D Distance Formula we will learn the 3D Distance formula for the following cases:
Distance between Two Points in 3D
For two points P(x1, y1, z1) and Q(x2, y2, z2) located in three-dimensional space, the 3D distance formula is given as

In case of origin one of the points will be O(0, 0, 0) and hence we will use x1 = 0, y1 = 0 and z1 = 0 in the formula to calculate the distance.
Example: Find the distance between two points P(2, 5, 6) and Q(3, 4, 7)
Answer:
For point P, x1 = 2, y1 = 5, z1 = 6
For point Q, x2 = 3, y2 = 4, z2 = 7
Distance between P and Q is given as
PQ = √[(x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2]
Now filling the values of coordinates in the above formula we get
PQ = √[(3 - 2)2 + (4 - 5)2 + (7 - 6)2]
⇒ PQ = √(1 + 1 + 1) = √3 units
Distance between a Point and Origin in 3D
Like 2D system we can also calculate the distance between a point and origin. In 3D system the coordinate of origin is given as O(0, 0, 0). Hence, we need to put the values of x1 = 0, y1 = 0 and z1 = 0 or even can chose x2, y2 and z2 to be zero as this does not cause any change is the value.
The distance formula to calculate the distance between a point and origin in 3D is given in the image attached below:

Example: Calculate the distance between P(-1, 2, 4) and origin O.
Solution:
We know that the coordinates for origin is O(0, 0, 0)
Hence, the Distance between origin O(0, 0, 0) and P(-1, 2, 4) is given as
OP = √(x2 + y2 + z2)
⇒ OP = √{(-1)2 + 22 + 42}
⇒ OP = √{1 + 4 + 16} = √21 units
The derivation of 3D Distance Formula can be understood with the help of the following image.

Let there be two points P(x1, y1, z1) and Q(x2, y2, z2) in three-dimensional space and are part of rectangular axes. Through Points P and Q draw planes parallel to the coordinate plane. Thus we get a rectangular parallelepiped in which PQ is body diagonal.
Consider Point A adjacent to Q such that AP is face diagonal. Now, AP is along one of the coordinate axes, hence AP is perpendicular to AQ.
Using Pythagoras Theorem
PQ2 = AP2 + AQ2 ..... (i)
Now take a point M adjacent to P and A such that MQ is a body diagonal
AP2 = AM2 + PM2 ......(ii)
Putting the values of AP2 from (ii) to (i)
⇒ PQ2 = AM2 + PM2 + AQ2
PM = x2 - x1
AQ = y2 - y1
AM = z2 - z1
Hence,
PQ2 = (x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2
Hence, if PQ = d
then distance formula between two points in 3D is given as
d2 = (x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2
⇒ d = √[(x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2]
If the distance is measured from the origin then the 3D Distance formula is given as
d = √(x2 + y2 + z2)
Example 1: Find the distance between the points P(1, –3, 4) and Q (– 4, 1, 2).
Solution:
Using the formula to calculate the distance between point P and Q,
Distance (d) = √[(x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2]
d = √[(-4-1)2+(1+3)2+(2-4)2] = √(25 + 16 + 4) = √45 units
Example 2: Show that the points P (–2, 3, 5), Q (1, 2, 3), and R (7, 0, –1) are collinear.
Solution:
We know that points are said to be collinear if they lie on a line.
PQ = √{(1+2)2 + (2-3)2 + (3-5)2} = √{9+1+4} = √14 units
QR = √{(7-1)2 + (0-2)2+(-1-3)2} = √{36+4+16} = √56 = 2√14
PR = √{(7+2)2 + (0-3)2 + (-1-5)2} = √{81+9+36} = √126 = 3√14
As PQ + QR = PR
Hence P, Q, and R are collinear.
Distance of Point From a Line
The distance of a point from a line is the perpendicular distance from the point to the line.
Suppose we have to find the distance of a point P(x0, y0, z0) from line l, then the formula is,
Distance (d) = \frac{ \left|\overline{P_{0}P_{1}} \times \overline{s} \right| }{ |\overline{s}| }
Where 's' is the directing vector of line l.
Example: Find the distance from point P(-6, 1, 21) to a line \frac{x+4}{3}=\frac{y+5}{1}=\frac{z+1}{1} ?
Solution:
Let Line L : \frac{(x+4)}3 = \frac{(y+5)}1 = \frac{(z+1)}1 = t
P(-6, 1, 21) and P'(3t-4, t-5, t-1)
⇒ \overline{PP'} = \begin{vmatrix}{3t-4-(-6)} \\ {t-5-1} \\ {t-1-21}\end{vmatrix}
⇒ \overline{PP'} = \begin{vmatrix}{3t+2} \\ {t-6} \\ {t-22}\end{vmatrix}
Now, \overline{PP'}* \overline{s} = 0
⇒ \begin{vmatrix}{3t+2} \\ {t-6} \\ {t-22}\end{vmatrix} . \begin{vmatrix}{3} \\ {1} \\ {1}\end{vmatrix} = 0
⇒ 9t + 6+t -6+t-22 = 0, 11t - 22=0 and t=2
⇒ \overline{PP'} = \begin{vmatrix}{3(2)+2} \\ {(2)-6} \\ {(2)-22}\end{vmatrix}
⇒ \overline{PP'} = \begin{vmatrix}{8} \\ {-4} \\ {-20}\end{vmatrix}
⇒ \overline{PP'} = 4\begin{vmatrix}{2} \\ {-1} \\ {-5}\end{vmatrix}
⇒ d = |\overline{PP'}|= 4 \sqrt{4+1+25} = 4 \sqrt{30}
Distance of a Point from a Plane
The distance from a point to a plane is the perpendicular distance from a point on a plane.

If Qx + Ry + Sz + T = 0 is a plane equation, then the distance from point P(Px, Py, Pz) to the plane can be found using the following formula:
Distance (d) = \frac{ \left|Q\cdot P_x+R\cdot P_y+S\cdot P_z+T\right| }{ \sqrt{Q^2+R^2+S^2} }
Example: Find the distance between plane 2x + 4y - 4z - 6 = 0 and point P(0, 3, 6)?
Solution:
Using the formula:
Distance (d) = \frac{ |4.1+2.2+(-4).5+-(6)| }{ \sqrt{4^2+2^2+4^2} }
⇒ d = \frac{ |4 +4 -20-6| }{ \sqrt{16+4+16} }
⇒ d = |-18|/√36 = 18/6 = 3
Distance Between Parallel Lines
The distance between any two parallel lines is the perpendicular distance from any point on one line to the other line.

Suppose there are two parallel lines y = mx + c1 and y = mx + c2, then the formula is,
Distance (d) = \frac{|c_2-c_1|}{ \sqrt{1+m^2} }
If the equation of two parallel lines is given as:
ax + by + d1 = 0 and ax + by + d2 = 0, then the formula is,
Distance (d) = \frac{|d_2-d_1|}{ \sqrt{a^2+b^2} }
Where a and b are the coefficients of variables x and y in the line.
Example 1: Find the distance between parallel lines y = 2x + 10 and y = 2x + 12.
Solution:
The lines y = 2x + 10 and y = 2x + 12 are in form y = mx + c.
Where c1 = 10, c2 = 12, m = 2
Using formula, the distance (d) = |12-10|/√(1 + 22) = 2/5
Example 2: Find the distance between two parallel lines 4x + 3y + 6 = 0 and 4x + 3y - 3 = 0
Solution:
The lines given are 4x + 3y + 6 = 0 and 4x + 3y - 3 = 0. Both lines are in the form ax + by + d = 0.
Hence, d1 = 6, d2 = −3, a = 4, b = 3
Using the formula for this case, distance (d) will be calculated as:
⇒ d = \frac{|d2-d1|}{ \sqrt{a^2+b^2} }
⇒ d = \frac{|-3-6|}{ \sqrt{4^2+3^2} }
⇒ d = |-9|/√(16 + 9)
⇒ d = 9/√25
⇒ d = 9/5
Read More,
Q1. Calculate the distance between the points P(-1, 0, 1) and Q(2, -1, 3)
Q2. Calculate the distance of the point (3, -5, 4) from the Origin.
Q3. Calculate the distance between the plane x + 2y - z + 3 = 0 and the Point (1, -2, 1)
Q4. Calculate the distance between two parallel lines 3x + 2y + 5 = 0 and 3x + 2y + 6 = 0
Similar Reads
CBSE Class 11 Maths Notes CBSE Class 11 Maths Revision Notes have been designed in the most basic and detailed format possible, covering nearly all domains such as differential calculus, arithmetic, trigonometry, and coordinate geometry. We know how hard it gets when you shift to an altogether new grade where subjects are no
15+ min read
Chapter 1: Sets
Representation of a SetSets are defined as collections of well-defined data. In Math, a Set is a tool that helps to classify and collect data belonging to the same category. Even though the elements used in sets are all different from each other, they are all similar as they belong to one group. For instance, a set of dif
8 min read
Types Of SetsIn mathematics, a set is defined as a well-defined collection of distinct elements that share a common property. These elementsâ like numbers, letters, or even other sets are listed in curly brackets "{ }" and represented by capital letters. For example, a set can include days of the week. The diffe
13 min read
Universal SetsUniversal Set is a set that has all the elements associated with a given set, without any repetition. Suppose we have two sets P = {1, 3, 5} and Q = {2, 4, 6} then the universal set of P and Q is U = {1, 2, 3, 4, 5, 6}. We generally use U to denote universal sets. Universal Set is a type of set that
6 min read
Venn DiagramVenn diagrams are visual tools used to show relationships between different sets. They use overlapping circles to represent how sets intersect, share elements, or stay separate. These diagrams help categorize items, making it easier to understand similarities and differences. In mathematics, Venn di
14 min read
Operations on SetsSets are fundamental in mathematics and are collections of distinct objects, considered as a whole. In this article, we will explore the basic operations you can perform on sets, such as union, intersection, difference, and complement. These operations help us understand how sets interact with each
15+ min read
Union of SetsUnion of two sets means finding a set containing all the values in both sets. It is denoted using the symbol 'âª' and is read as the union. Example 1:If A = {1, 3. 5. 7} and B = {1, 2, 3} then AâªB is read as A union B and its value is,AâªB = {1, 2, 3, 5, 7}Example 2:If A = {1, 3. 5.7} and B = {2, 4} t
12 min read
Chapter 2: Relations & Functions
Cartesian Product of SetsThe term 'product' mathematically refers to the result obtained when two or more values are multiplied together. For example, 45 is the product of 9 and 5.To understand the Cartesian product of sets, one must first be familiar with basic set operations such as union and intersection, which are appli
7 min read
Relations and FunctionsIn mathematics, we often deal with sets of numbers or objects and the ways they are connected. Two important concepts that help us describe these connections are relations and functions.A relation is simply a connection between two sets of objects. Think of it as a rule that pairs elements from one
3 min read
Domain and Range of RelationsThe domain is the set of all possible input values (the "x" values), and the range is the set of all possible output values (the "y" values) in a relation.For any two non-empty sets A and B, we define the relation R as the subset of the Cartesian product of A Ã B where each member of set A is relate
8 min read
Piecewise FunctionPiecewise Function is a function that behaves differently for different types of input. As we know a function is a mathematical object which associates each input with exactly one output. For example: If a function takes on any input and gives the output as 3. It can be represented mathematically as
11 min read
Range of a FunctionFunctions in math can be thought of as vending machines. Given the money in the form of input, they give some cans or cookies in return. Similarly, functions take some input numbers and give us some output. It can be said that, in real life, Everything can be formulated and solved with the help of f
7 min read
Chapter 3: Trigonometric Functions
Chapter 4: Principle of Mathematical Induction
Chapter 5: Complex Numbers and Quadratic Equations
Complex NumbersComplex numbers are an essential concept in mathematics, extending the idea of numbers to include solutions for equations that don't have real solutions. Complex numbers have applications in many scientific research areas, signal processing, electromagnetism, fluid dynamics, quantum mechanics, and v
12 min read
Algebra of Real FunctionsThe algebra of real functions refers to the study and application of algebraic operations on functions that map real numbers to real numbers. A function can be thought of as a rule or set of rules which map an input to an output knows as its image. It is represented as x ⢠Function ⢠y. A real funct
5 min read
Algebraic Operations on Complex NumbersA complex number is a number that includes both a real and an imaginary part. It is written in the form:z = a + biWhere:a is the real part,b is the imaginary part,i is the imaginary unit, satisfying i2 = â1.Algebraic operations on complex numbers follow specific rules based on their real and imagina
7 min read
Polar Representation of Complex NumbersComplex numbers, which take the form z = x + yi, can also be represented in a way that highlights their geometric properties. This alternative representation is known as the polar form. The polar representation of a complex number expresses it in terms of its magnitude (modulus) and direction (argum
9 min read
Absolute Value of a Complex NumberThe absolute value (also called the modulus) of a complex number z = a + bi is its distance from the origin in the complex plane. The absolute value tells you how far a number is from zero, regardless of its direction (positive or negative).It is denoted as â£z⣠and is given by the formula:|z| = \sqr
7 min read
Conjugate of Complex NumbersIn the world of mathematics, complex numbers are one of the most important discoveries by mathematicians as they help us solve many real-life problems in various fields such as the study of electromagnetic waves, engineering, and physics.The Conjugate of a Complex Number is also a complex number obt
6 min read
Imaginary NumbersImaginary numbers are numbers as the name suggests are the number that is not real numbers. All the numbers real and imaginary come under the categories of complex numbers. Imaginary numbers are very useful in solving quadratic equations and other equations whose solutions can not easily be found us
9 min read
Chapter 6: Linear Inequalities
Compound InequalitiesCompound Inequalities are the combination of two or more inequalities. These inequalities are combined using two conditions that are AND, and OR. These conditions have specific meanings and they are solved differently. The inequities in compound inequalities are individually solved using normal rule
10 min read
Algebraic Solutions of Linear Inequalities in One VariableA linear inequality is a mathematical expression involving an inequality symbol (<, >, â¤, or â¥) and a linear expression. Unlike linear equations, which give a specific solution, linear inequalities define a range of possible solutions.Example: 2x+3>5 In this case, the inequality indicates t
8 min read
Graphical Solution of Linear Inequalities in Two VariablesWe know how to formulate equations of different degree, and it is used a lot in real life, but the question arises, is it always possible to convert a situation into an equation? Sometimes we get statements like, the number of Covid cases per day in Delhi has reached more than 10,000. This phrase âL
8 min read
Solving Linear Inequalities Word ProblemsWe are well versed with equations in multiple variables. Linear Equations represent a point in a single dimension, a line in a two-dimensional, and a plane in a three-dimensional world. Solutions to linear inequalities represent a region of the Cartesian plane. It becomes essential for us to know ho
10 min read
Chapter 7: Permutations and Combinations
Fundamental Principle of CountingThe fundamental principle of counting is a basic concept used to determine the total number of possible outcomes in a situation where there are multiple independent events. It allows us to count a large number of possibilities without needing to list each one individually.For example, consider guess
11 min read
PermutationIn Mathematics, Permutation is defined as a mathematical concept that determines the number of possible arrangements for a specific set of elements. therefore, it plays a big role in computer science, cryptography, and operations research. For example, take a set {1, 2, 3}:All Permutations taking al
15+ min read
CombinationsCombination is a way of choosing items from a set, (unlike permutations) when the order of selection doesn't matter. In smaller cases, it's possible to count the number of combinations. Combination refers to the mixture of n things taken k at a time without repetition.Example: For set S = {a, b, c},
8 min read
Chapter 8: Binomial Theorem
Chapter 9: Sequences and Series
Sequences and SeriesA sequence is an ordered list of numbers following a specific rule. Each number in a sequence is called a "term." The order in which terms are arranged is crucial, as each term has a specific position, often denoted as anâ, where n indicates the position in the sequence.For example:2, 5, 8, 11, 14,
10 min read
General and Middle Terms - Binomial Theorem - Class 11 MathsBinomial theorem or expansion describes the algebraic expansion of powers of a binomial. According to this theorem, it is possible to expand the polynomial "(a + b)n" into a sum involving terms of the form "axzyc", the exponents z and c are non-negative integers where z + c = n, and the coefficient
7 min read
Arithmetic SeriesAn arithmetic series is the sum of the terms of an arithmetic sequence, where an arithmetic sequence is a sequence of numbers in which the difference between consecutive terms is constant. Or we can say that an arithmetic progression can be defined as a sequence of numbers in which for every pair of
5 min read
Arithmetic SequenceAn arithmetic sequence or progression is defined as a sequence of numbers in which the difference between one term and the next term remains constant.For example: the given below sequence has a common difference of 1.1 2 3 4 5 . . . n â â â â â . . . 1st 2nd 3rd 4th 5th . . . nth TermsThe Arithmetic
8 min read
Geometric Progression or GPGeometric Progression (GP) is a sequence of numbers where each term after the first is found by multiplying the previous term by a constant called the common ratio.For Example, the sequence given below forms a GP with a common ratio of 2 1 2 4 8 16 . . . nâ â â â â . . . 1st 2nd 3rd 4th 5th . . . nt
12 min read
Geometric SeriesIn a Geometric Series, every next term is the multiplication of its Previous term by a certain constant, and depending upon the value of the constant, the Series may increase or decrease.Geometric Sequence is given as: a, ar, ar2, ar3, ar4,..... {Infinite Sequence}a, ar, ar2, ar3, ar4, ....... arn {
3 min read
Arithmetic Progression and Geometric ProgressionArithmetic Progression and Geometric Progression: The word "sequence" in English means a collection of some numbers or objects in such a way that it has a first member, a second member, and so on. Sequences can be of anything, for example. - January, February, .... is the sequence of months in a yea
10 min read
Special Series in Maths - Sequences and Series | Class 11 MathsSpecial Series: A series can be defined as the sum of all the numbers of the given sequence. The sequences are finite as well as infinite. In the same way, the series can also be finite or infinite. For example, consider a sequence as 1, 3, 5, 7, ⦠Then the series of these terms will be 1 + 3 + 5 +
10 min read