Plotting Lines in Mathematica



Similar documents
that satisfies (2). Then (3) ax 0 + by 0 + cz 0 = d.

Section 13.5 Equations of Lines and Planes

Math 241 Lines and Planes (Solutions) x = 3 3t. z = 1 t. x = 5 + t. z = 7 + 3t

12.5 Equations of Lines and Planes

10.5. Click here for answers. Click here for solutions. EQUATIONS OF LINES AND PLANES. 3x 4y 6z 9 4, 2, 5. x y z. z 2. x 2. y 1.

Jim Lambers MAT 169 Fall Semester Lecture 25 Notes

JUST THE MATHS UNIT NUMBER 8.5. VECTORS 5 (Vector equations of straight lines) A.J.Hobson

Section 11.4: Equations of Lines and Planes

Lines and Planes in R 3

Section 1.4. Lines, Planes, and Hyperplanes. The Calculus of Functions of Several Variables

CHAPTER FIVE. 5. Equations of Lines in R 3

Math 241, Exam 1 Information.

Lines and Planes 1. x(t) = at + b y(t) = ct + d

THREE DIMENSIONAL GEOMETRY

Section 9.5: Equations of Lines and Planes

Equations Involving Lines and Planes Standard equations for lines in space

Equations of Lines and Planes

MAT 1341: REVIEW II SANGHOON BAEK

Vector Spaces; the Space R n

Example 1: Model A Model B Total Available. Gizmos. Dodads. System:

Geometric description of the cross product of the vectors u and v. The cross product of two vectors is a vector! u x v is perpendicular to u and v

Solutions to old Exam 1 problems

Name Class. Date Section. Test Form A Chapter 11. Chapter 11 Test Bank 155

Example SECTION X-AXIS - the horizontal number line. Y-AXIS - the vertical number line ORIGIN - the point where the x-axis and y-axis cross

Chapter 8. Lines and Planes. By the end of this chapter, you will

Section 1.1. Introduction to R n

1.5 Equations of Lines and Planes in 3-D

Solving Systems of Equations

MATH 275: Calculus III. Lecture Notes by Angel V. Kumchev

2.1 Three Dimensional Curves and Surfaces

Section 2.4: Equations of Lines and Planes

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

1.2 GRAPHS OF EQUATIONS. Copyright Cengage Learning. All rights reserved.

Quickstart for Desktop Version

9 Multiplication of Vectors: The Scalar or Dot Product

LINES AND PLANES IN R 3

VECTOR ALGEBRA A quantity that has magnitude as well as direction is called a vector. is given by a and is represented by a.

Definition: A vector is a directed line segment that has and. Each vector has an initial point and a terminal point.

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Determine whether the following lines intersect, are parallel, or skew. L 1 : x = 6t y = 1 + 9t z = 3t. x = 1 + 2s y = 4 3s z = s

13.4 THE CROSS PRODUCT

LINES AND PLANES CHRIS JOHNSON

BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle

FURTHER VECTORS (MEI)

MA261-A Calculus III 2006 Fall Homework 3 Solutions Due 9/22/2006 8:00AM

Review Sheet for Test 1

Lines & Planes. Packages: linalg, plots. Commands: evalm, spacecurve, plot3d, display, solve, implicitplot, dotprod, seq, implicitplot3d.

Vectors 2. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

Geometry Course Summary Department: Math. Semester 1

GeoGebra. 10 lessons. Gerrit Stols

1. A student followed the given steps below to complete a construction. Which type of construction is best represented by the steps given above?

Section The given line has equations. x = 3 + t(13 3) = t, y = 2 + t(3 + 2) = 2 + 5t, z = 7 + t( 8 7) = 7 15t.

Vector Algebra CHAPTER 13. Ü13.1. Basic Concepts

Section 7.2 Linear Programming: The Graphical Method

C relative to O being abc,, respectively, then b a c.

42 CHAPTER 1. VECTORS AND THE GEOMETRY OF SPACE. Figure 1.18: Parabola y = 2x Brief review of Conic Sections

EQUATIONS and INEQUALITIES

Notes from February 11

y intercept Gradient Facts Lines that have the same gradient are PARALLEL

Section 11.1: Vectors in the Plane. Suggested Problems: 1, 5, 9, 17, 23, 25-37, 40, 42, 44, 45, 47, 50

Equation of a Line. Chapter H2. The Gradient of a Line. m AB = Exercise H2 1

Module1. x y 800.

SECTION 2.2. Distance and Midpoint Formulas; Circles

5 VECTOR GEOMETRY. 5.0 Introduction. Objectives. Activity 1

LINEAR EQUATIONS IN TWO VARIABLES

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

5 Systems of Equations

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

MATH REVIEW SHEETS BEGINNING ALGEBRA MATH 60

REVIEW OF ANALYTIC GEOMETRY

Problem set on Cross Product

Lecture 8 : Coordinate Geometry. The coordinate plane The points on a line can be referenced if we choose an origin and a unit of 20

Chapter 4.1 Parallel Lines and Planes

Representing Polynomials

Graphing Linear Equations

5.3 The Cross Product in R 3

Solving Simultaneous Equations and Matrices

A vector is a directed line segment used to represent a vector quantity.

1. Equations for lines on the plane and planes in the space.

i=(1,0), j=(0,1) in R 2 i=(1,0,0), j=(0,1,0), k=(0,0,1) in R 3 e 1 =(1,0,..,0), e 2 =(0,1,,0),,e n =(0,0,,1) in R n.

Essential Mathematics for Computer Graphics fast

3. Solve the equation containing only one variable for that variable.

Write the Equation of the Line Review

Higher. Polynomials and Quadratics 64

Graphing Linear Equations

D.2. The Cartesian Plane. The Cartesian Plane The Distance and Midpoint Formulas Equations of Circles. D10 APPENDIX D Precalculus Review

= y y 0. = z z 0. (a) Find a parametric vector equation for L. (b) Find parametric (scalar) equations for L.

discuss how to describe points, lines and planes in 3 space.

Classifying Solutions to Systems of Equations

Mathematical goals. Starting points. Materials required. Time needed

CIRCLE COORDINATE GEOMETRY

1.(6pts) Find symmetric equations of the line L passing through the point (2, 5, 1) and perpendicular to the plane x + 3y z = 9.

Lecture 1 Introduction Rectangular Coordinate Systems Vectors Lecture 2 Length, Dot Product, Cross Product Length...

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

PROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS

Figure 1.1 Vector A and Vector F

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Exam 1 Sample Question SOLUTIONS. y = 2x

Geometry 1. Unit 3: Perpendicular and Parallel Lines

Transcription:

Lines.nb 1 Plotting Lines in Mathematica Copright 199, 1997, 1 b James F. Hurle, Universit of Connecticut, Department of Mathematics, 196 Auditorium Road Unit 39, Storrs CT 669-39. All rights reserved. This notebook discusses lines in the plane and 3-space and illustrates how to plot them in Mathematica. 1. Lines. Mathematica has a built-in command to plot the line segment between two points P(a, b) and Q(c, d). The following -line routine illustrates its use. Execute it b placing our cursor after the last line and pressing the Enter ke. In[1]:= (* Mathematica Routine to plot line segment through two points in the plane*) P := {-, }; Q := {1, 1}; lineseg = Graphics[ { RGBColor[1,, 1], Line[{P, Q}] } ] Show[lineseg, Axes -> True, AxesLabel -> {x, }] Out[]= Ü Graphics Ü 3 - -1. -1 -.. 1 x Out[]= Ü Graphics Ü A more powerful tool for plotting lines through two points uses vector parametric representation. Such a representation of the line L through two points P(a, b) and Q(c, d) comes from the parallelogram law of vector addition. Namel, to get to an point R(x, ) on the line, start at the origin and go first to the point P(a, b) on the line, b viewing P as

Lines.nb the endpoint of the vector x = OP = (a, b). From P travel along the line b adding an appropriate multiple t of the vector v = PQ = (c a, d b). See the figure. P t PQ OP R Q This leads to the parametric vector equation x x = x + t v = (a, b) + t (c a, d b), t œ R for L. An eas wa to plot such a vector equation in Mathematica is via the ParametricPlot command. For the line L through the two points (, ) and (1, 1), a vector in the direction of L is v = 3 i j = (3, ). A vector equation for L is then x = (, ) + t (3, ) = ( + 3t, t). That corresponds to the scalar parametric equations x = + 3t, = t, t œ R. The following simple Mathematica routine plots this for the range t œ [ 1, ].Tr it! In[7]:= ParametricPlot[ {- + 3 t, - t}, {t, -1, }, PlotStle -> RGBColor[1,, 1] ] 8 6 - - - Out[7]= Ü Graphics Ü There are reall no algebraic differences between lines in -space or 3-space. In the latter space, points have three coordinates instead of two, but the above reasoning still applies

Lines.nb 3 to ield a parametric vector equation for the line through two points P(a, b, c) and Q(p, q, r): x = x + t v = (a, b, c ) + t (p a, q b, r c), t œ R. This in turn gives the scalar parametric equations x = a + t (p a), = b + t(q b), z = c + t(r c), t œ R. Mathematica plots such a line b means of its 3-dimensional parametric plotting command, ParametricPlot3D. For example, the following routine plots the line L through the points P(1,, 3) and Q( 1, 1, ). First, note that a vector in the direction of L is PQ= (, 1, 1). A parametric vector equation for the line is therefore x = (1,, 3) + t (, 1, 1) = i + j + 3k + t ( i j + k). A set of parametric scalar equations is then x = 1 t, = t, z = 3 + t, t œ R. The following Mathematica routine provides a plot.execute the routine to generate the graph. In[8]:= plotline = Graphics3D[ParametricPlot3D[ {1 - t, - t, 3 + t, RGBColor[1,, 1]}, {t, -, } ]] 3-1 1 3 Out[8]= Ü Graphics3D Ü

Lines.nb To add coordinate axes inside the surrounding coordinate box, execute the following cell. In[9]:= ParametricPlot3D[ {{1 - t, - t, 3 + t, RGBColor[1,, 1]}, { t,,, RGBColor[, 1, ]}, {, t,, RGBColor[, 1, ]}, {,, t, RGBColor[, 1, ]}}, {t, -, }, AxesLabel -> {x,, z} ] - - z - - - - x Out[9]= Ü Graphics3D Ü Two lines in space can be parallel, perpendicular, or skew. The latter term applies to nonparallel lines that do not intersect (because the lie in parallel planes). 3.6. Definition. Two lines x = x 1 + sv and x = x + tw are parallel if their direction vectors v and w are parallel vectors. The lines are perpendicular if v and w are perpendicular vectors (that is, v w = ) and the two lines intersect. The next routine plots a pair of lines with parametric equations, and can help ou decide whether or not the two lines likel intersect. To confirm that, solve the two sets of scalar equations simultaneousl to determine algebraicall whether the two lines in fact do have a common point. In[1]:= lines = Graphics3D[ParametricPlot3D[{ {1 - t, + 3 t, + 6 t, RGBColor[1,, ]}, { + t, -3 + t, 1-3 t, RGBColor[,, 1]}}, {t, -, } ] ]

Lines.nb - - 1 Out[1]= Ü Graphics3D Ü To add coordinate axes inside the surrounding coordinate box, execute the following cell. ParametricPlot3D[ { {1 - t, + 3 t, + 6 t, RGBColor[1,, ]}, { + t, -3 + t, 1-3 t, RGBColor[,, 1]}, { t,,, RGBColor[, 1, ]}, {, t,, RGBColor[, 1, ]}, {,, t, RGBColor[, 1, ]} }, {t, -, }, AxesLabel -> {x,, z} ]

Lines.nb 6 - x - - 1 z -1 The figure suggests that intersection is possible. To investigate further, equate the respective x-coordinate expressions + t and 1 s and the -coordinate expressions 3 + t and + 3s. From + t = 1 s, it follows that t = 1 s. Substitution of that into the equation 3 + t = + 3s gives 3 + ( 1 s) = + 3s fl s = + 3s fl 7 = 7s fl s = 1. The corresponding value of t = 1 s = 1. To see finall whether the lines intersect, substitute the values s = 1 and t = 1 into the two z-coordinate expressions to see whether a valid equation results. In this case that gives from the first line z = 1 3t = 1 3(1) = and from the second z = + 6s = + 6( 1) =. Hence, the two lines do intersect at the point (3, 1, ).