Two dimensions: Points
A point is specified by an ordered pair of numbers called its
coordinates. Let the coordinates of P_{1} be
(x_{1},y_{1}), those of P_{2} be
(x_{2},y_{2}), and those of P_{3} be
(x_{3},y_{3}).
The distance from P_{1} to P_{2} is
d = sqrt[(x_{1}x_{2})^{2}+
(y_{1}y_{2})^{2}].
The coordinates of the point dividing the line segment
P_{1}P_{2} in the ratio r/s are:
([r x_{2}+s x_{1}]/[r+s],
[r y_{2}+s y_{1}]/[r+s]).
As a special case, when r = s, the midpoint of the line segment has
coordinates
([x_{2}+x_{1}]/2,[y_{2}+y_{1}]/2).
P_{1}, P_{2}, and P_{3} are collinear if and
only if the determinant

x_{1} 
y_{1} 
1 

= 0. 
x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
[Back to Contents]
Two dimensions: Directions
A direction is determined by an ordered pair of two numbers
(a,b), not both zero, called direction numbers. The direction
corresponds to all lines parallel to the line through the origin
(0,0) and the point (a,b). The direction numbers (a,b) and the
direction numbers (ra,rb) determine the same direction, for any
nonzero r.
We pick an r in the following way.
r = 1/sqrt(a^{2}+b^{2}).
If a is nonzero, the sign of r is the same as the sign of a. If a = 0
and b is nonzero, the sign of r is the same as the sign of b. This
means that the first nonzero number in (ra,rb) is positive.
With this choice of r, the direction numbers (ra,rb) are just the
cosines of the angles that the line makes with the positive x, and
yaxes. These angles alpha and beta, respectively, are called the
direction angles, and their cosines (cos[alpha],cos[beta]) are
called the direction cosines of that direction. They satisfy
cos^{2}[alpha] + cos^{2}[beta] = 1.
Since alpha + beta = Pi/2, and cos[beta] = sin[alpha], beta is
superfluous and usually not used. The angle alpha is called the
inclination of the direction, and m = tan[alpha] = b/a is called
the slope of the direction.
In this context, we can think of the possibility of infinite slope,
which occurs if the direction cosines are (0,1), and the inclination is
Pi/2, so the direction is vertical. We interpret 1/m to be 0 in that
case.
Two directions are parallel if and only if any of the following
relations hold:
alpha_{1} = alpha_{2},
m_{1} = m_{2},

a_{1} 
b_{1} 

= 0. 
a_{2} 
b_{2} 
Two directions are perpendicular if and only if
alpha_{1}alpha_{2} = Pi/2,
m_{1}m_{2} = 1,
a_{1}a_{2} + b_{1}b_{2} = 0.
The angle between two directions is given by
alpha_{1}  alpha_{2} =
arctan([m_{1}m_{2}]/[1+m_{1}m_{2}]) =
arctan([a_{2}b_{1}a_{1}b_{2}]/[a_{1}a_{2}+b_{1}b_{2}]).
The direction perpendicular to a given direction
(a_{1},b_{1}) has direction numbers
(b_{1},a_{1}).
Two points P_{1} and P_{2} determine a direction with
direction numbers
(x_{2}x_{1},y_{2}y_{1}). The slope
of that direction is
m = (y_{2}y_{1})/(x_{2}x_{1}).
[Back to Contents]
Two dimensions: Lines
A line is the set of all points with coordinates (x,y) which satisfy an
equation of degree 1 in x and y, that is, a linear equation.
Let the slope of the line be m, its intersection with the xaxis be
(a,0), its intersection with the yaxis be (0,b), its perpendicular
distance from the origin be p, its inclination be alpha, and the
inclination of any line perpendicular to it be omega. Then
tan(alpha) = m = b/a (if a is not zero), and
omega = alpha ± Pi/2.
The equation of a line can have any of several forms:
 Slope yintercept form:
y = m x + b, if m is finite.
 Two point form:
(xx_{1})(y_{2}y_{1}) =
(yy_{1})(x_{2}x_{1}).
 Point slope form:
y  y_{1} = m(xx_{1}), if m is finite.
 Intercept form:
x/a + y/b = 1, if neither a nor b is zero.
 Normal form:
x cos(omega) + y sin(omega) = p.
 Parametric form:
x = x_{1} + t cos(alpha),
y = y_{1} + t sin(alpha),
where t is any real number.
 Point direction form:
(xx_{1})/A = (yy_{1})/B,
where (A,B) is the direction of the line and P_{1} lies on the
line.
 General form:
A x + B y + C = 0,
where A, B, and C are real numbers, and not both A and B are zero.
The distance from Ax + By + C = 0 to P_{1} is
d = (Ax_{1}+By_{1}+C)/sqrt(A^{2}+B^{2}).
If A_{1}x + B_{1}y + C_{1} = 0 and
A_{2}x + B_{2}y + C_{2} = 0 are two lines,
then their slopes are given by
m_{1} = A_{1}/B_{1} and
m_{2} = A_{2}/B_{2}.
If they intersect, their intersection point has coordinates
x = (C_{1}B_{2}+C_{2}B_{1})/(A_{1}B_{2}A_{2}B_{1}),
y = (A_{1}C_{2}+A_{2}C_{1})/(A_{1}B_{2}A_{2}B_{1}).
Three lines
A_{1}x + B_{1}y + C_{1} = 0,
A_{2}x + B_{2}y + C_{2} = 0,
A_{3}x + B_{3}y + C_{3} = 0,
are concurrent (that is, all pass through a single point) if
and only if the determinant

A_{1} 
B_{1} 
C_{1} 

= 0. 
A_{2} 
B_{2} 
C_{2} 
A_{3} 
B_{3} 
C_{3} 
The perpendicular bisector of the line segment
P_{1}P_{2} has the equation
(x_{2}x_{1})x + (y_{2}y_{1})y 
[(x_{2}^{2}+y_{2}^{2}) 
(x_{1}^{2}+y_{1}^{2})]/2 = 0.
A line segment P_{1}P_{2} can be represented in
parametric form by
x = x_{1} + (x_{2}x_{1})t,
y = y_{1} + (y_{2}y_{1})t,
0 <= t <= 1.
Two line segments P_{1}P_{2} and
P_{3}P_{4} intersect if any only if the solution (s,t)
of the two simultaneous equations
x_{1} + (x_{2}x_{1})t =
x_{3} + (x_{4}x_{3})s,
y_{1} + (y_{2}y_{1})t =
y_{3} + (y_{4}y_{3})s,
which are
s = 

x_{2}–x_{1} 
y_{2}–y_{1} 

, 
x_{3}–x_{1} 
y_{3}–y_{1} 


x_{2}–x_{1} 
y_{2}–y_{1} 

x_{3}–x_{4} 
y_{3}–y_{4} 
t = 

x_{3}–x_{1} 
y_{3}–y_{1} 

, 
x_{3}–x_{4} 
y_{3}–y_{4} 


x_{2}–x_{1} 
y_{2}–y_{1} 

x_{3}–x_{4} 
y_{3}–y_{4} 
satisfy 0 <= s <= 1 and 0 <= t <= 1.
[Back to Contents]
Two dimensions: Triangles
The area of the triangle formed by the three lines
A_{1}x + B_{1}y + C_{1} = 0,
A_{2}x + B_{2}y + C_{2} = 0,
A_{3}x + B_{3}y + C_{3} = 0,
is given by


A_{1} 
B_{1} 
C_{1} 

^{2} 
A_{2} 
B_{2} 
C_{2} 
A_{3} 
B_{3} 
C_{3} 

K = 
 . 


The area of a triangle whose vertices are P_{1}, P_{2},
and P_{3} is given by the determinants
K = (1/2) 

x_{1} 
y_{1} 
1 

, 
x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
K = (1/2) 

x_{2}–x_{1} 
y_{2}–y_{1} 

. 
x_{3}–x_{1} 
y_{3}–y_{1} 
The centroid (intersection of the medians, or center of gravity) of the
same triangle has coordinates
x = (x_{1}+x_{2}+x_{3})/3, y = (y_{1}+y_{2}+y_{3})/3.
The incenter (intersection of the angle bisectors) of the same triangle
has coordinates
x = (ax_{1}+bx_{2}+cx_{3})/(a+b+c), y = (ay_{1}+by_{2}+cy_{3})/(a+b+c),
where a is the length of P_{2}P_{3},
b is the length of P_{3}P_{1}, and
c is the length of P_{1}P_{2}.
The circumcenter (intersection of the side perpendicular bisectors) of
the same triangle has coordinates


x_{1}^{2}+y_{1}^{2} 
y_{1} 
1 

x_{2}^{2}+y_{2}^{2} 
y_{2} 
1 
x_{3}^{2}+y_{3}^{2} 
y_{3} 
1 



x_{1} 
x_{1}^{2}+y_{1}^{2} 
1 

x_{2} 
x_{2}^{2}+y_{2}^{2} 
1 
x_{3} 
x_{3}^{2}+y_{3}^{2} 
1 


x = 

, y = 

. 

2 

x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 


2 

x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 
The orthocenter (intersection of the altitudes) of the same triangle
has coordinates


y_{1} 
x_{2}x_{3}+y_{1}^{2} 
1 

y_{2} 
x_{3}x_{1}+y_{2}^{2} 
1 
y_{3} 
x_{1}x_{2}+y_{3}^{2} 
1 



x_{1}^{2}+y_{2}y_{3} 
x_{1} 
1 

x_{2}^{2}+y_{3}y_{1} 
x_{2} 
1 
x_{3}^{2}+y_{1}y_{2} 
x_{3} 
1 


x = 

, y = 

. 


x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 



x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 
To determine if P_{0} = (x_{0},y_{0}) is
inside, on, or outside of a given triangle
P_{1}P_{2}P_{3}, solve the following three
linear equations for the three unknowns r, s, and t:


x_{0} 
y_{0} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 

x_{1} 
y_{1} 
1 

x_{0} 
y_{0} 
1 
x_{3} 
y_{3} 
1 
 

x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{0} 
y_{0} 
1 
 
r = 

, s = 

, t = 

. 


x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 

x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 

x_{1} 
y_{1} 
1 

x_{2} 
y_{2} 
1 
x_{3} 
y_{3} 
1 
 
(1) If 0 < r < 1, 0 < s < 1, 0 < t < 1, then P_{0} is properly
inside the triangle.
(2) If 0 <= r <= 1, 0 <= s <= 1, 0 <= t <= 1, and one or two of r, s,
and t is zero, then P_{0} is on the triangle's boundary (one
zero means edge, two zeroes means vertex).
(3) If any of the inequalities in (2) above is false, P_{0} is
outside the triangle.
[Back to Contents]
Two dimensions: Polygons
The area of a polygon whose vertices are P_{1}, P_{2},
.., P_{n} is given by the expression
K = [(x_{1}y_{2} + x_{2}y_{3} +
x_{3}y_{4} + ... + x_{n}y_{1}) 
(x_{2}y_{1} + x_{3}y_{2} +
x_{4}y_{3} + ... + x_{1}y_{n})]/2.
[Back to Contents]
Two dimensions: Conic Sections
A conic section is the set of points P in a plane determined by a line
D (a directrix) and a point F (a focus) not on D, such
that the ratio of distances PF/PD = e (the eccentricity).
A vertex is a point where the distances PF and PD are least.
An axis is the line through F perpendicular to D.
The latus rectum is the distance between those two points on the
curve which also lie on a line through F parallel to D.
The value of e determines what kind of curve the conic section forms:
 e > 1, an hyperbola.
 e = 1, a parabola.
 e < 1, an ellipse.
If F has coordinates (0,0), and D has equation x = a, then the
equation of the conic section is
x^{2} + y^{2} = e^{2}(x+a)^{2}.
A vertex has coordinates (ae/[1+e],0), and an axis has equation y = 0.
Note that the equation of a conic section is always a quadratic
equation.
[Back to Contents]
Two dimensions: Hyperbolas
The line segment connecting the two vertices, which lies on the axis,
is called the transverse axis, and has length 2a. Its midpoint
is the center of the hyperbola. Perpendicular to the transverse
axis at the midpoint is the conjugate axis, whose length is 2b.
The eccentricity is e = sqrt(a^{2}+b^{2})/a. The
distance from the center to either of the two foci is ae. The distance
from a vertex to the nearest focus is a(e1). The distance from the
center to either of the two directrices is a/e. The length of the
latus rectum is 2b^{2}/a.
The absolute value of the difference of the distances from any point
on the hyperbola to the two foci is 2a.
The equation of the hyperbola has one of the following forms:
 General form:
Ax^{2} + Bxy + Cy^{2} + Dx + Ey + F = 0,
where B^{2}4AC > 0.
 General form with axes parallel to the coordinate axes:
Ax^{2} + Cy^{2} + Dx + Ey + F = 0,
where AC < 0.
 Standard form:
(xh)^{2}/a^{2}  (yk)^{2}/b^{2} = 1.
In this form, the center has coordinates (h,k), the transverse axis has
equation y = k, the conjugate axis has equation x = h, the directrices
have equations x = h + a/e and x = h  a/e, and the asymptotes have
equations a(yk) ± b(xh) = 0. The latus rectum has length
2b^{2}/a. The tangent to the hyperbola at P_{1} has
equation
(xh)(x_{1}h)/a^{2} 
(yk)(y_{1}k)/b^{2} = 1.
The normal to the hyperbola at P_{1} has equation
b^{2}(yy_{1})(x_{1}h) =
a^{2}(xx_{1})(y_{1}k).
 Asymptotic form:
xy = e^{2}/4.
In this form, the center is the origin, a = b = e/sqrt(2), the foci
have coordinates (a,a) and (a,a), the transverse axis has equation
y = x, the conjugate axis has equation y = x, and the asymptotes have
equations x = 0 and y = 0.
[Back to Contents]
Two dimensions: Parabolas
The distance from the vertex to F is p = a/2. The distance from the
vertex to D is p. The length of the latus rectum is 4p.
The equation of the parabola can be put into any of the following
forms:
 Standard form:
x^{2} = 4py.
In this form the vertex is the origin, F has coordinates (0,p), and
D has equation y = p.
 Vertex form:
(xh)^{2} = 4p(yk),
In this form the vertex has coordinates (h,k), F has coordinates
(h,k+p), and D has equation y = kp. The length of the latus rectum
of the parabola is 4p. The tangent to the parabola at P_{1}
has equation
2p(yy_{1}) = (x_{1}h)(xx_{1}).
The normal to the parabola at P_{1} has equation
2p(xx_{1}) = (hx_{1})(yy_{1}).
 General form:
Ax^{2} + Bxy + Cy^{2} + Dx + Ey + F = 0,
where B^{2}4AC = 0, and not all of A, B, and C are zero.
 General form, axis parallel to the xaxis:
Cy^{2} + Dx + Ey + F = 0 (C, D nonzero),
x = ay^{2} + by + c (a nonzero).
 General form, axis parallel to the yaxis:
Ax^{2} + Dx + Ey + F = 0 (A, E nonzero),
y = ax^{2} + bx + c (a nonzero).
[Back to Contents]
Two dimensions: Ellipses
The line segment connecting the two vertices, which lies on the axis,
is called the major axis, and has length 2a. Its midpoint is
the center of the ellipse. Perpendicular to the major axis at
the center is the minor axis, whose length is 2b. The
eccentricity is e = sqrt(a^{2}b^{2})/a < 1. The
distance from the center to either of the two foci is ae. The distance
from a vertex to the nearest focus is a(1e). The distance from the
center to either of the two directrices is a/e. The length of the
latus rectum is 2b^{2}/a.
The sum of the distances from any point on the ellipse to the two foci
is 2a.
The equation of the ellipse has one of the following forms:
 General form:
Ax^{2} + Bxy + Cy^{2} + Dx + Ey + F = 0,
where B^{2}4AC < 0.
 General form with axes parallel to the coordinate axes:
Ax^{2} + Cy^{2} + Dx + Ey + F = 0,
where AC > 0.
 Standard form:
(xh)^{2}/a^{2} + (yk)^{2}/b^{2} = 1
(b <= a).
In this form, the center has coordinates (h,k), the major axis has
equation y = k, the minor axis has equation x = h, and the directrices
have equations x = h + a/e and x = h  a/e. The latus rectum has
length 2b^{2}/a. The tangent to the ellipse at P_{1}
has equation
(xh)(x_{1}h)/a^{2} +
(yk)(y_{1}k)/b^{2} = 1.
The normal to the ellipse at P_{1} has equation
b^{2}(yy_{1})(x_{1}h) =
a^{2}(xx_{1})(y_{1}k).
[Back to Contents]
Two dimensions: Circles
A circle is an ellipse with e = 0, a = b = r, coincident foci, and
directrices at infinity. Its equation can take any one of the
following forms:
 Center radius form:
(xh)^{2} + (yk)^{2} = r^{2} (r > 0).
The equation of the tangent to this circle at P_{1} has
equation
(xh)(x_{1}h) + (yk)(y_{1}k) = r^{2}.
The equation of the normal to this circle at P_{1} has
equation
(yy_{1})(x_{1}h) =
(xx_{1})(y_{1}k).
 General form:
A x^{2} + A y^{2} + D x + E y + F = 0 (A nonzero,
D^{2} + E^{2} > 4AF).
Then the center of the circle has coordinates (h,k), where h = D/(2A),
k = E/(2A), and the radius of the circle is
r = sqrt(D^{2}+E^{2}4AF)/(2A) > 0.
 Diameter form, where P_{1} and P_{2} are the
endpoints of a diameter:
(xx_{1})(xx_{2}) +
(yy_{1})(yy_{2}) = 0.
 Three point form, where P_{1}, P_{2}, and
P_{3} lie on the circle:

x^{2}+y^{2} 
x 
y 
1 

= 0. 
x_{1}^{2}+y_{1}^{2} 
x_{1} 
y_{1} 
1 
x_{2}^{2}+y_{2}^{2} 
x_{2} 
y_{2} 
1 
x_{3}^{2}+y_{3}^{2} 
x_{3} 
y_{3} 
1 
 Parametric form:
x = r cos(t), y = r sin(t), 0 <= t < 2 Pi.
The center of gravity of a sector of a circle with radius r and central
angle theta lies on the bisector of the central angle, and its distance
from the center is
4 r sin(theta/2)/(3 theta).
The center of gravity of a segment of a circle with radius r and
central angle theta lies on the bisector of the central angle, and its
distance from the center is
4 r sin^{3}(theta/2)/(3[thetasin(theta)]).
A circle (xx_{1})^{2} + (yy_{1})^{2}
= r^{2} and a line Ax + By + C = 0 are tangent
if and only if
Delta = r^{2}(A^{2}+B^{2}) 
(Ax_{1}+By_{1}+C)^{2} = 0.
The line and circle do not intersect if Delta < 0, and they
intersect in two points if Delta > 0. In the latter case, the two
points of intersection have coordinates
x = (B^{2}x_{1}ABy_{1}AC+B
sqrt[Delta])/(A^{2}+B^{2}),
y = (A^{2}y_{1}ABx_{1}BCA
sqrt[Delta])/(A^{2}+B^{2}) and
x = (B^{2}x_{1}ABy_{1}ACB
sqrt[Delta])/(A^{2}+B^{2}),
y = (A^{2}y_{1}ABx_{1}BC+A
sqrt[Delta])/(A^{2}+B^{2}).
Two circles with centers at P_{1} and P_{2} and radii
r_{1} and r_{2} are externally tangent if and only if
(x_{1}x_{2})^{2} +
(y_{1}y_{2})^{2} =
(r_{1}+r_{2})^{2}.
The same two circles are internally tangent if and only if
(x_{1}x_{2})^{2} +
(y_{1}y_{2})^{2} =
(r_{1}r_{2})^{2}.
The common chord or common tangent of the two circles has equation
2(x_{2}x_{1})x + 2(y_{2}y_{1})y +
x_{1}^{2}  x_{2}^{2} +
y_{1}^{2}  y_{2}^{2} 
r_{1}^{2} + r_{2}^{2} = 0.
The coordinates of the point(s) of intersection of the two circles are
x = ([x_{1}x_{2}][r_{1}^{2}r_{2}^{2}x_{1}^{2}+x_{2}^{2}]+[x_{1}+x_{2}][y_{1}y_{2}]^{2}+[y_{1}y_{2}]sqrt[Delta])/(2[x_{1}x_{2}]^{2}+2[y_{1}y_{2}]^{2}),
y = ([y_{1}y_{2}][r_{1}^{2}r_{2}^{2}y_{1}^{2}+y_{2}^{2}]+[y_{1}+y_{2}][x_{1}x_{2}]^{2}[x_{1}x_{2}]sqrt[Delta])/(2[x_{1}x_{2}]^{2}+2[y_{1}y_{2}]^{2}),
and
x = ([x_{1}x_{2}][r_{1}^{2}r_{2}^{2}x_{1}^{2}+x_{2}^{2}]+[x_{1}+x_{2}][y_{1}y_{2}]^{2}[y_{1}y_{2}]sqrt[Delta])/(2[x_{1}x_{2}]^{2}+2[y_{1}y_{2}]^{2}),
y = ([y_{1}y_{2}][r_{1}^{2}r_{2}^{2}y_{1}^{2}+y_{2}^{2}]+[y_{1}+y_{2}][x_{1}x_{2}]^{2}+[x_{1}x_{2}]sqrt[Delta])/(2[x_{1}x_{2}]^{2}+2[y_{1}y_{2}]^{2}),
where
Delta = ([x_{1}x_{2}]^{2}+[y_{1}y_{2}]^{2}[r_{1}r_{2}]^{2})([x_{1}x_{2}]^{2}+[y_{1}y_{2}]^{2}[r_{1}+r_{2}]^{2}).
The equations of the two lines tangent to a circle with center at
P_{1} and radius r from an outside point P_{2} are
([x_{1}x_{2}][y_{1}y_{2}] ± r sqrt[(x_{1}x_{2})^{2}+(y_{1}y_{2})^{2}r^{2}])(xx_{2}) + (r^{2}[x_{1}x_{2}]^{2})(yy_{2}) = 0.
[Back to Contents]
Two dimensions: General Quadratic Equations
A general quadratic equation can be put into the following form:
If we have an equation of this kind, it can represent one of nine different kinds
of curve. Which kind depends on the signs of the following four quantities:
Delta = 

, J = 

, I = a + c, K = 

+ 

. 
The cases are as follows:
Case Delta J Delta/I K Curve Standard Form
1 +/ +  Real ellipse x^{2}/a^{2} + y^{2}/b^{2} = 1
2 +/ + + Imaginary ellipse x^{2}/a^{2} + y^{2}/b^{2} = 1
3 +/  Hyperbola x^{2}/a^{2}  y^{2}/b^{2} = 1
4 +/ 0 Parabola x^{2}/a^{2}  y = 0
5 0  Real intersecting lines x^{2}/a^{2}  y^{2}/b^{2} = 0
6 0 + Imaginary intersecting lines x^{2}/a^{2} + y^{2}/b^{2} = 0
7 0 0  Real parallel lines x^{2}/a^{2} = 1
8 0 0 + Imaginary parallel lines x^{2}/a^{2} = 1
9 0 0 0 Coincident lines x^{2}/a^{2} = 0
The equation can be put into standard form by making a rotation to remove the
xyterm, completing the square(s), and then making a translation to move the center
to the origin.