## Exploring Analyic Geometry with |
|||||

Home | Contents | Commands | Packages | Explorations | Reference |

Tour | Lines | Circles | Conics | Analysis | Tangents |

Coordinates and Points

Numbers

Rectangular Coordinates

Line Segments and Distance

Midpoint between Two Points

Point of Division of Two Points

Collinear Points

Explorations

The fundamental concept of analytic geometry is the one-to-one correspondence established between points in a plane and (x,y) coordinates. This chapter introduces these concepts and develops some simple functions involving points.

Initialize

To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.

This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.

<<Descarta2D`

Numbers [Top]

Integers are the whole numbers used for counting, both negative and positive, as well as zero. Ratios of integers such as 1/2, 5/7, 4/1 and 23/15 are called rational numbers. Numbers that can be plotted as distances from a fixed point on a line are called real numbers. Examples are -8, 0, 2.1387, , 5/3 and π.

If a and b represent real numbers and , the expression a+bi is a complex number. A complex number is the sum of a real number a and a pure imaginary number bi. The two complex numbers a+bi and a-bi are called conjugate complex numbers.

In general, this book deals with real numbers, but since we are using algebraic techniques to study geometry, complex numbers naturally arise in the formulations. Mathematica provides a variety of ways to represent numbers as summarized in Table [pts:tbl01].

Numbers in Mathematica.

Any given number, integer, rational, real or complex, is a constant. Mathematica provides symbols for some common numbers that are fixed value constants as shown in Table [pts:tbl02]. Sometimes we do not wish to specify what the particular constant is and indicate a general constant by any one of the letters a, b, c, …, A, B, C, …, and such constants are referred to as parameters.

Some common constants in Mathematica.

Rectangular Coordinates [Top]

The basic idea in analytic geometry is to establish a one-to-one correspondence between the points of a plane and number pairs (x,y). This correspondence may be established in many ways, but the one most commonly used is as follows. Consider two perpendicular lines X'X and Y'Y intersecting in the point O. The horizontal line X'X is called the x-axis, and the vertical line Y'Y the y-axis, and together they form a rectangular coordinate system.

Coordinate axes and quadrants.

These axes divide the plane into four quadrants labeled I, II, III and IV as shown in Figure [pts:fig01]. The point O is called the origin. When numerical scales are established on the axes, positive distances x are laid off to the right of the origin and are called abscissas; negative abscissas are laid off to the left. Positive distances y are drawn upwards and are called ordinates; negative ordinates are drawn downward. Thus OX and OY have positive sense (or direction) while OX' and OY' have negative sense. The unit scales on the x-axis and the y-axis need not be the same, but problems in analytic geometry often assume the units are equal on both axes.

Coordinates specifying positions in the plane.

Clearly such a system of coordinates can be used to describe the positions of points in the plane. For example, by going out +3 units on the x-axis and +2 units on the y-axis a point labeled A is located as shown in Figure [pts:fig2]. The point A is said to have the pair of numbers 3 and 2 as its coordinates, and it is customary to write A(3,2) or simply (3,2). Similarly, B has the coordinates (-2,-1) and lies in the third quadrant. It is evident that for the point pictured in the second quadrant, the x-coordinate is negative and the y-coordinate is positive. We will write as the general representation of a point in the plane at coordinates and .

The fundamental principle of analytic geometric is that there exists a one-to-one correspondence between number pairs and points in the plane: to each pair of numbers there corresponds one and only one point and, conversely, to each point in the plane there corresponds one and only one pair of numbers.

Example: Plot the points with the following coordinates: (-2,3), (4,2) and (-4,-1).

Solution: Descarta2D represents a point (x,y) as Point2D[{x,y}]. The function Sketch2D[objList] plots a list of objects.

Sketch2D[{Point2D[{-2,3}],

Point2D[{4,2}],

Point2D[{-4,-1}]}]

The curly brackets surrounding the point's coordinates are optional and may be omitted. Descarta2D will automatically add the curly brackets when the point's abscissa and ordinate are given as two arguments, Point2D[x,y], as shown below. A symbolic name may be assigned to a point, and this name can be used later to refer to the point.

p1=Point2D[-2,3]

p1

■

Line Segments and Distance [Top]

Given two points A and B on the x-axis, or on a line parallel to the x-axis, the line segment from point A to point B extends over a certain number of units of length used as the scale on the x-axis. If the direction from A to B points to the right, we say that is a positive segment. On the other hand, if the direction from A to B points to the left, we say that is a negative segment. Then we can assign to the segment a positive or negative number indicating the direction and number of units of the segment. This signed number is indicated by AB. The absolute value of , indicated by , is a positive number called the length of the line segment. When the context is clear the symbol AB may be used to represent the line containing the points A and B, the line segment , or the length of the segment, .

To calculate the number (positive or negative) of x-units in the segment AB, let be the abscissa of B and let be the abscissa of A. Then, if B is to the right of A, the number of x-units in the segment AB is equal to . We define BA to be the negative of segment AB. Thus

In the same fashion we can define a directed segment CD on, or parallel to, the y-axis, to be positive or negative depending on whether the arrow from C to D points up (positive direction) or down (negative direction). Thus

Let and be two points lying in the first quadrant and draw line segments and parallel to the coordinate axes as shown in Figure [pts:fig02]. By subtracting the abscissas, ; similarly subtracting ordinates, . Making use of the Pythagorean Theorem on the right triangle , we have

and the positive distance , d, is given by

Distance between points.

The same formula holds true regardless of the quadrants in which the points lie and regardless of the order in which the points are taken.

Example: Find the distance between the two points (3,-1) and (-4,-2).

Solution: Taking the points in the given order, we have

Or, taking the points in the opposite order,

The Descarta2D function Distance2D[coord,coord] computes the distance between two locations given as coordinates. The function Distance2D[point,point] computes the distance between two points.

{Distance2D[{3,-1},{-4,-2}],

Distance2D[Point2D[{3,-1}],Point2D[{-4,-2}]]}

The coordinates of the points may be symbolic and the points themselves may be named points.

Clear[x1,y1,x2,y2];

p1=Point2D[{x1,y1}];p2=Point2D[{x2,y2}];

Distance2D[p1,p2]

■

Mathematica Hint: The Mathematica function Clear is used in the previous example and throughout other examples in this book to insure that variable names used in the examples are not set to some unintended value from a previous computation.

Descarta2D Hint: There are several Descarta2D functions that are handy for working with points and coordinates. Coordinates2D[point] returns the (x,y) coordinates of a point as the list {x,y}. The functions XCoordinate2D[point] and XCoordinate2D[coord] give the x-coordinate, and YCoordinate2D[point] and YCoordinate2D[coord] give the y-coordinate.

Midpoint between Two Points [Top]

Midpoint between two points.

The midpoint between two points is the point bisecting the line segment connecting the two points. If the coordinates of the two points are and as shown in Figure [pts:fig5], then the midpoint, , has coordinates

Example: Find the midpoint between the points (-2,1) and (3,-2).

Solution: The function Point2D[point,point] returns the midpoint of the two points. Alternatively, the function Point2D[lnseg] returns the midpoint of a line segment.

p1=Point2D[{-2,1}];

p2=Point2D[{3,-2}];

p12=Point2D[p1,p2]

■

Point of Division of Two Points [Top]

Point of division.

Given a directed line segment such as , we wish to find the coordinates of the point P which divides into a given ratio as illustrated in Figure [pts:fig6]. Let P have the coordinates (x,y) which are to be determined. Sense is important here and P must be located so that .

Since and are similar, it follows that . Solving this equation for x yields

Similarly,

To find the midpoint of the segment the ratio must be unity; hence and Equations ([pts:eq1]) and ([pts:eq2]) specialize to

Equations ([pts:eq1]), ([pts:eq2]) and ([pts:eq3]) also have useful physical interpretations. In ([pts:eq1]) and ([pts:eq2]), let x and y be the coordinates of the center of gravity of masses and placed at and , respectively. If the masses are equal, the center of gravity lies halfway between them as indicated by ([pts:eq3]).

It is of further interest to note the positions of P for various values of the ratio . If this ratio is zero, then P coincides with , and if this ratio is a positive number, P is an internal point of division. As , . For , P is an external point of division (in the direction of ). For , P is an external point in the opposite direction with negative and positive.

Example: Find the point that divides the line segment between the points and into the ratio .

Solution: The Descarta2D function Point2D[point,point,,] returns the point that divides the line segment between the points into the ratio .

Point2D[Point2D[{-2,5}],Point2D[{4,-1}],-2,1]

■

Notice that it is invalid for to equal zero in Equations ([pts:eq1]) and ([pts:eq2]) as this would tend to generate a point at infinity.

Point Offset a Distance

Point offset a distance towards a point.

Given two points and we wish to find the point offset a distance, d, from in the direction of . We can use the point of division formula from the previous section to determine the coordinates of the offset point. As shown in Figure [pts:fig9] the desired point is a point of division between and where and is the distance between and . Using the point of division function from Descarta2D yields

Clear[x1,y1,x2,y2,d,D12];

Point2D[Point2D[{x1,y1}],Point2D[{x2,y2}],d,D12-d]

Rearranging and using standard mathematical notation produces

where d is the (possibly negative) offset distance and is the distance between the two points.

Example: Find the point offset a distance 2 from the point (3,1) towards the point (-2,4).

Solution: The Descarta2D function Point2D[point,point,d] returns the point offset a distance d from the first point to the second point.

Point2D[Point2D[{3,1}],Point2D[{-2,4}],2]

■

Collinear Points [Top]

Three distinct points , and are said to be collinear if they lie on the same straight line. We can construct any point, , on the line by selecting an appropriate value for d and applying Equation ([pts:eq04]). All such points , and are obviously collinear by construction. Now consider the value of the determinant

Mathematica provides the Det command for expanding the value of such a determinant.

Clear[x1,y1,x2,y2,x3,y3,d,D12];

Det[{{x1,y1,1},{x2,y2,1},{x3,y3,1}}] /.

{x3->x1+(x2-x1)*d/D12,y3->y1+(y2-y1)*d/D12} //Simplify

We see from Mathematica that for any value of d, the determinant given is zero. Therefore, the necessary and sufficient condition that three points lie on the same line is given by the determinant equation

where the coordinates of the points are , and .

Example: Show that the three points (1,2), (7,6) and (4,4) are collinear.

Solution: The Mathematica function Det[elemList] returns the determinant of the nested list of elements.

Det[{{1,2,1},{7,6,1},{4,4,1}}]

Descarta2D provides a specific function for determining whether three points are collinear: IsCollinear2D[point,point,point] returns True if the points are collinear; otherwise, it returns False.

IsCollinear2D[Point2D[{1,2}],Point2D[{7,6}],Point2D[{4,4}]]

Descarta2D Hint: Using IsCollinear2D is preferable to using the Mathematica function Det for determining collinearity because IsCollinear2D accommodates slight round-off errors that may occur in the floating point arithmetic in the computer.

Sketch2D[{Point2D[{1,2}],Point2D[{7,6}],

Point2D[{4,4}]},PlotRange->{{-1,8},{-1,8}}]

■

Explorations [Top]

Collinear Points. [ptscol.html]

Show that the three points (3a,0), (0,3b) and (a,2b) are collinear.

Distance using Polar Coordinates. [polardis.html]

The location of a point in the plane may be specified using polar coordinates, (r,θ), where r is the distance from the origin to the point, and θ is the angle the ray to the point from the origin makes with the +x-axis. Show that the distance, d, between two points and , given in polar coordinates, is

Non-uniqueness of Polar Coordinates [polarunq.html]

Show that the polar coordinates of a point (r,θ) are not unique as all points of the form

(r,θ+2kπ) and (-r,θ+(2k+1)π)

represent the same position in the plane for integer values of k.

Stewart's Theorem. [stewart.html]

Show that for any △ABC as shown in the figure above the relationship between the lengths of the labeled line segments is given by

Collinear Polar Coordinates [polarcol.html]

Show that the points , and in polar coordinates are collinear if and only if

Hypotenuse Midpoint Distance. [tridist.html]

Prove that the midpoint of the hypotenuse of a right triangle is equidistant from the vertices.

www.Descarta2D.com