Introduction to Cartesian Geometry
Welcome to Introduction to Cartesian Geometry
In Cartesian or Analytic Geometry we will learn how to represent points, lines, and planes using the Cartesian Coordinate System, also called Rectangular Coordinate System. This can be applied to solve a broad range of problems from geometry to algebra and it will be very useful later on Calculus.
Cartesian Coordinate System[edit  edit source]
The foundations of Analytic Geometry lie in the search for describing geometric shapes by using algebraic equations. One of the most important mathematicians that helped to accomplish this task was René Descartes for whom the name is given to this exciting subject of mathematics.
The Coordinate System[edit  edit source]
For a coordinate system to be useful we want to give to each point an attribute that helps to distinguish and relate different points. In the Cartesian system we do that by describing a point using the intersection of two(2D Coordinates) or more(Higher Dimensional Coordinates) lines. Therefore a point is represented as P(x_{1},x_{2},x_{3},...,x_{n}) in "n" dimensions.
2D Coordinates[edit  edit source]
You can look at a 2D Coordinate system as a system in which a point can be defined using two values. We do this by using two perpendicular and directed lines called the abscissa(xaxis) and the ordinate(yaxis). The point of intersection of these two lines is called the origin denoted O(0,0). Any point can be determined as P(x,y), where x is the value in the xaxis and y is the value in the yaxis.
3d Coordinate Geometry[edit  edit source]
The coordinate system in two dimensions uses values containing width and depth expressed as values of and/or
Coordinate geometry in three dimensions adds the dimension of height, usually expressed as a value of The axes of and usually represent the horizontal plane. The axis is thus vertical or normal to the plane of and
In three dimensional space a point is shown as where the 3 values locate the point relative to the origin along each of the axes respectively. The value is valid, usually the origin.
Within this page the values are all real numbers.
Examples of points in 3 dimensional space.[edit  edit source]
Points of 1 dimension
Points of 2 dimensions
Points of 3 dimensions

Distance between 2 points[edit  edit source]
Consider the point What is the distance from point to the origin? Point is the projection of on to the plane of Calculate length Then length Length In this case The general case: For two points and the distance Length is the special case in which The distance may be in which case and are the same point. 
The line in 3 dimensions[edit  edit source]
as 2 points[edit  edit source]
as point and 3 direction numbers[edit  edit source]

Angle between two lines[edit  edit source]
In the diagram line has direction numbers Point has coordinates Line has direction numbers and point has coordinates Length Length Length By the cosine rule
If all values are direction cosines, If the lines are normal. If or the lines are parallel.

Normal to 2 lines[edit  edit source]
A line normal or perpendicular to two lines is normal to each line. Before attempting to calculate the direction numbers of the normal, first verify that the two lines are not parallel. Let the normal have direction numbers Let the 2 lines have direction numbers Then: and
If divisor If divisor Provided that all inputs are valid, then at least one of must be nonzero and at least one of or or must be valid. From above:
Values of that satisfy this condition are:
Proof: Angle between and
Therefore the two groups of direction numbers are normal. Similarly it can be shown that the two groups of direction numbers and are normal. The line normal to and has direction numbers:

Normal to 1 line[edit  edit source]
If a given line has direction numbers
For example: If the given line has direction numbers If the given line has direction numbers If the given line has direction numbers 
Point and line[edit  edit source]
In the diagram line and point are well defined and Point is on line Line is perpendicular to line Calculate the coordinates of point and length Initial considerations:
Calculate direction cosines of line : Calculate direction cosines of line : Calculate Calculate length Calculate length Let point have coordinates Then point lengthlengthlength Calculate length By extending line PQ with constant K[edit  edit source]

Points of closest approach[edit  edit source]
Points of closest approach are the 2 points at which the distance between 2 skew lines is minimum. Let 2 lines be Calculate point on It's possible that length may be zero in which case points are the same point and the lines intersect.
Let Calculate the direction numbers of the normal:
and point Relative to
or:
This is a system of three equations with three unknowns: If are direction cosines, length
Example 2:

The plane in 3 dimensions[edit  edit source]
In two dimensions the point that is always equidistant from two fixed points is the line. In three dimensions the point that is always equidistant from two fixed points is the plane. Let point have coordinates Let point have coordinates Distance must be nonzero. Let point have coordinates Then length = length
This equation has the form where:
Normal to the plane:[edit  edit source]
Distances:[edit  edit source]
To visualize the plane:[edit  edit source]
Defining the plane[edit  edit source]
Plane and line[edit  edit source]
Plane and point[edit  edit source]
Plane and plane[edit  edit source]

Reviewing:[edit  edit source]
Now that information about the plane is available to the reader, some of the concepts above can be reviewed and simplified.
Point and line[edit  edit source]
Points of closest approach[edit  edit source]

Three planes[edit  edit source]
The intersection of 3 planes is a point. The word "intersection" implies that the three planes actually intersect. Given three random planes, there are two situations that do not produce a point of intersection:

The sphere[edit  edit source]
The sphere is the locus of a point that is always a fixed nonzero distance from a given fixed point. Let the point be Let Then
where:
reversing the conversion[edit  edit source]Given a sphere defined as
examples[edit  edit source]

Sphere and line[edit  edit source]
Given a sphere and a line:
from the center of the sphere is always greater than the radius of the sphere. The possible point/s of intersection may be calculated by trigonometry or by algebra. Given a sphere defined as By trigonometry:[edit  edit source]
By extending line with constant K[edit  edit source]
By algebra:[edit  edit source]

Defined as 4 points[edit  edit source]
If 4 unique points on surface of sphere are known, the center and radius may be calculated. Let center of sphere be Let 4 points on surface of sphere be
or
def centerFrom4 (input) :
row1,row2,row3,row4 = input
a,b,c = row1
g,h,j = row2
k,l,m = row3
n,p,q = row4
top = (
+ (a)*(a)*(c)*(h)*(m)  (a)*(a)*(c)*(h)*(q)  (a)*(a)*(c)*(j)*(l) + (a)*(a)*(c)*(j)*(p)
+ (a)*(a)*(c)*(l)*(q)  (a)*(a)*(c)*(m)*(p)  (a)*(a)*(h)*(j)*(m) + (a)*(a)*(h)*(j)*(q)
+ (a)*(a)*(j)*(j)*(l)  (a)*(a)*(j)*(j)*(p)  (a)*(a)*(j)*(l)*(q) + (a)*(a)*(j)*(m)*(p)
+ (b)*(b)*(c)*(h)*(m)  (b)*(b)*(c)*(h)*(q)  (b)*(b)*(c)*(j)*(l) + (b)*(b)*(c)*(j)*(p)
+ (b)*(b)*(c)*(l)*(q)  (b)*(b)*(c)*(m)*(p)  (b)*(b)*(h)*(j)*(m) + (b)*(b)*(h)*(j)*(q)
+ (b)*(b)*(j)*(j)*(l)  (b)*(b)*(j)*(j)*(p)  (b)*(b)*(j)*(l)*(q) + (b)*(b)*(j)*(m)*(p)
 (b)*(c)*(g)*(g)*(m) + (b)*(c)*(g)*(g)*(q)  (b)*(c)*(h)*(h)*(m) + (b)*(c)*(h)*(h)*(q)
 (b)*(c)*(j)*(j)*(m) + (b)*(c)*(j)*(j)*(q) + (b)*(c)*(j)*(k)*(k) + (b)*(c)*(j)*(l)*(l)
+ (b)*(c)*(j)*(m)*(m)  (b)*(c)*(j)*(n)*(n)  (b)*(c)*(j)*(p)*(p)  (b)*(c)*(j)*(q)*(q)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*(d)*(j)*(n) + (g)*(g)*(q) + (h)*(h)*(q) + (j)*(j)*(q)
 (j)*(n)*(n)  (j)*(p)*(p)  (j)*(q)*(q))
/
(2*( (b)*(j) + (b)*(q) + (c)*(h)  (c)*(p)  (h)*(q) + (j)*(p)))
)
print ('e = ',e)
f = (
(+ (a)*(a)  2*(a)*(d) + (b)*(b)  2*(b)*(e) + (c)*(c) + 2*(d)*(n) + 2*(e)*(p)  (n)*(n)  (p)*(p)  (q)*(q))
/
(2*( (c) + (q)))
)
print ('f = ',f)
return (d,e,f)
p1 = (16,11,29) #
p2 = (17,5,20) # The 4 known points.
p3 = (25,3,14) #
p4 = (10,19,13) #
d,e,f = centerFrom4 ((
p1,p2,p3,p4
))
print ([ ( (dv[0])**2 + (ev[1])**2 + (fv[2])**2 )**.5 for v in (p1,p2,p3,p4) ])
d = 13.0
e = 7.0
f = 17.0
[13.0, 13.0, 13.0, 13.0] # Distance from each point to center = 13.
