Wednesday, 30 June 2010

Old Statistics?

Two different approaches to Statistics from about the same time in history came across my desk today. Ron Dirkse sent me the following clip from Mark Twain's "Life on the Mississippi":

In the space of one hundred and seventy-six years the Lower Mississippi has shortened itself two hundred and forty-two miles. That is an average of a trifle over one mile and a third per year. Therefore, any calm person, who is not blind or idiotic, can see that in the Old Oolitic Silurian Period, just a million years ago next November, the Lower Mississippi River was upward of one million three hundred thousand miles long, and stuck out over the Gulf of Mexico like a fishing-rod. And by the same token any person can see that seven hundred and forty-two years from now the Lower Mississippi will be only a mile and three-quarters long, and Cairo and New Orleans will have joined their streets together, and be plodding comfortably along under a single mayor and a mutual board of aldermen. There is something fascinating about science. One gets such wholesale returns of conjecture out of such a trifling investment of fact.


And on the "statpics" blog, Robert W. Jernigan, Professor of Statistics at American University, posted some notes on the First Published Random Walk. Turns out it was by John Venn in 1888, only fourteen years after the first copyrite date of "Life on the Mississippi." And the randomizing device??? The digits of Pi... too bad I didn't get this a day earlier.. 6/28 could be called 2 Pi day.
Here is the image from Venn's classic "The Logic of Chance" :

Sunday, 13 June 2010

What's the Point

When I talked about the vector (or parametric) equations of a line, I failed to touch on one of the common questions from early linear algebra; to find the point where the two lines intersect.

When we have L1 = P + t U and L2 = Q + r V for direction vectors U and V, and point vectors P and Q, the two lines lie in a single plane (and thus intersect) if (P-Q), U, and V are form a dependent system. If there is a point where L1 and L2 are equal, then P + t U=Q + r V.
Reordering this we get (P-t) = rV-tU. This says that if there is a solution, there must be a linear combination of V and U that equals (P-Q) or that the three vectors form a dependent system. Remember back to Alg II when you learned about determinants and recall that if the determinant of a nxn matrix was =0, the system was called a dependent system. And hopefully you knew that meant there was a way to combine multiples of n-1 of the vectors to get the remaining one.

A linear combination of three vectors U, V, and W would be something like aU + bV + cW; and focusing on three space; if three vectors are all independent (they have a non-zero determinant) then you can use a linear combination of the three of them to find any point in three space. But if they are dependent (the determinant is zero) then a linear combination of the three vectors can only generate points on a plane or in extreme cases, on a line.

I will use the following two lines L1: (4,1,5)+t<1, -1, 2> and L2: (8,9,4)+r<2,2,1> to illustrate how to find the intersection.
We first need to know if there is actually an intersection so we construct the matrix with the vectors (P-Q), U, and V.. In this example (P-Q) = 4,8,-1; U= 1,-1, 2; and V= 2,2,1. When we find the determinant it is zero.
This means that P-Q can be written as some linear combination of U and V for appropriate values of t and r.

To find the value of t and r that will produce the linear combination, we set two of the parametric equations equal. For example, 4+t = 8+2r from the first (x) terms and 5+2t = 4+r from the third (z) can be rewritten as the system 2r-t=-4 and r-2t=1. A solution is r=-3, t=-2.

If we insert these into L1: (4,1,5)+t<1, -1, 2> and L2: (8,9,4)+r<2,2,1> we get L1: (4,1,5)-2<1, -1, 2> and L2: (8,9,4)-3<2,2,1>; both yielding the point (2,3,1) for a common point to both lines.

And that is really all there is to finding the intersection of two lines; but the idea also lets you do something a little more complex. You can use it to help find the shortest line segments between two skew lines.

But if instead we had L1=(4,1,5)+t<1, -1, 2>and L2= (3,4,4)+r<2,2,1>, then the determinant of the Matrix formed with vectors (P-Q), U, and V) would have a determinant of -10

which means that there is no linear combination of U and V that will give us P-Q. The
geometrical interpretation is that lines L1 and L2 are skew lines, lines that are not in the same plane.

It is possible to find the two parallel Planes that contain the two lines by using the cross product of the two direction vectors. The cross product of <1, -1, 2> and <2,2,1> is <5, -3, -4> so each plane can be written as 5x - 3y - 4 z = d for some d. The value of d for each line is the dot product of <5, -3, -4> with any point on the respective lines. For example the dot product of <5, -3, -4> and (4,1,5) is -3, so the equation of the plane containing L1 is 5x - 3y - 4 z = -3. Similarly we can find that L2 lies in the plane 5x - 3y - 4 z = -13. If we divide the difference, 10, by the unit vector in the direction <5, -3, -4>, (sqrt(50)), we find the distance between the two planes is sqrt(2). It should be easy to see that this will be the smallest distance between any two points on the respective lines.

To find the endpoints of this shortest segment between L1 and L2, we can imagine moving them onto the same plane and finding the point of intersection, and then use that intersection to find the points on the original lines.

To move the point (3,4,4) on L2 some number of units perpendicular to the two planes, we create the values (x,y,z)= (3,4,4)+s<5, -3, -4>

If this point is to be on the plane 5x - 3y - 4 z = -3 which L1 is on, it must be true that 5(3+5s) -3(4-3s) - 4(4-4s) = -3. This will simplify to 15 + 25 s - 12 + 16s -16 + 16s = -3 or 50 s = 10.

So s=1/5 and the new equation for L1 on the same plane as L2 is (x,y,z)= (3,4,4)+1/5 <5, -3, -4> + r<2,2,1> . That can be simplified down to (x,y,z)= (4, 3.4, 3.2)+r(2,2,1). Solving for the values of r and t that give an intersection we get 4+2r = 4+t so t=2r from the x(t) relations of the two lines.. and from z(t) we get 3.2+r = 5+2t and substituting t=2r; 3.2+r = 5+4r so 3r=-1.8 or r= -.6 and t=-1.2

The point of intersection in this common plane is (4, 3.4, 3.2) -.6<2,2,1>= (2.8,2.2, 2.6) and checking to be sure...(4,1,5)-1.2<1, -1, 2>=(2.8,2.2, 2.6), so all appears well.


Now we can apply these same parametric values (r=-.6 and t=-1.2) to find the end points on the original lines at (4,1,5)-1.2<1, -1, 2> = (2.8,2.2, 2.6) on the plane containing L1 and and (3,4,4)-.6<2,2,1>= (1.8, 2.8, 3.4). Just one last check to make sure that these are indeed a distance of sqrt(2) apart, we take the dot-product of the vector from one point to the other <2.8-2, 2.2-2.8, 2.6-3.4> and indeed we get a dot product of 2.

Friday, 11 June 2010

Conics with Vectors

Almost every Alg II class in America ( and most geometry classes) contains problems such as "Write the equation of a circle with a radius of 5 and a center at (3,1)." The assumption is that the circle lies in the x-y plane.

I stood in an Alg II classroom recently as students worked through a worksheet of such problems and wondered how hard it would be to extend this idea to write the equation of a circle with a given radius and center in ANY plane. The response is that it should be amazingly easy if we are familiar with the simpler ideas of using vectors.

The first step would be to develop the vector equivalent of the standard circle
equation, something like (x,y) = (h, k) + r cos(t) (1,0) + r sin(t) (0,1) where t has a domain from 0 to 2 Pi (or the equivalent in degrees). Then in any other plane, all that would be needed would be to replace the two unit vectors in the x and y direction with two perpendicular unit vectors in the desired plane.

Since each of the desired vectors would be perpendicular to each other and the normal to the plane we could pick one arbitrarily, then find the second using the cross product of the first with the normal to the plane.

Here is an example: " Find the circle with radius 5 and center at (3,1,2) in the plane x + y + 2z = 8. " Any vector perpendicular to (1,1,2) will work for the first direction vector, so (2,0,-1) is an easy choice. The cross product of (1,1,2) and (2,0,-1) will then be perpendicular to (2,0,-1) and lie in the desired plane. The cross product gives (1,-5, 2) for the perpendicular direction vector. Now we just write the equation using unit vectors in the directions of (2,0,-1) and (1,-5, 2). The equation for the circle requested is (x,y,z) = (3,1,2) + 5 cos(t) (2,0,-1)/sqrt(5) + 5 sin(t) (1,-5,2)/sqrt(30).

Checking that a given value of t meets all the requested, I pick pi/6 as an easy
choice. The point will be (x,y,z) = (3,1,2) + 5 sqrt(3)/2(2,0,-1)/sqrt(5) + (5/2)(1,-5,2)/sqrt(30). So x=7.3294 (appx) and y=-1.2822 and z= 0.9764.

If we are close this point should lie in the correct plane, and also be five units from the center, (3,1,2).

One more thing that starts to happen when you use vectors and write an equation in the x-y plane, such as a circle, is that you begin to imagine pulling it out in the z-direction. If you do this as a function of t, then you create a helix that coils around the z-axis as it climbs. A unit circle climbing at a rate of t/pi will climb one unit up the z-axis for each half turn of the circle. Using the equations x,y,z= cos(t)(1,0,0) + sin(t) (0,1,0) + t/pi (0,0,1) is an example. video


Other conics: It is simple to extend the circle to an ellipse by just replacing the radius in the appropriate places with the semi-major/minor axis lengths, a and b. The Ellipse centered at (3,1) with a=5, b=4 would be (x,y) = (3, 1) + 5 cos(t) (1,0) + 4 sin(t) (0,1).

As with quadratics, it is easy to write the ellipse rotated to lie along any line through the center. For example, if we wanted to rotate the ellipse above so that it made a 45 degree angle, we simply replace the two unit vectors in the x and y direction with unit vectors [sqr(2)/2, sqr(2)/2] and [-sqr(2)/2, sqr(2)/2].
Using decimal approximations for ease of writing, the equation becomes (x,y) = (3, 1) + 5 cos(t) (.707, .707) + 4 sin(t) (-.707,.707). The Winplot graph looks like this:


For fans of Geogebra, you can download a ggb sketch that will allow you to rotate a conic through any radian value.

For the hyperbola, simply replace the cosine and sine with tangent and secant (or secant and tangent to have the two branches open the other way).

Thursday, 10 June 2010

Vector Topics for Quadratic Equations

A freshman student in my seminar (think study hall) was trying to struggle through understanding the early introduction to quadratics and their graphs in Alg I. After helping( I hope) a little I started thinking about how I might approach quadratics in a vector enriched course.

The first easy thing is to abandon the y=Ax2 + Bx + C approach for the vertex form. The equation y=A(x-h)2 + k can be easily transformed into the vector form (x,y) = (h, k) + (t, At2 ) , but in thinking about extending the power of this model, I thought it better to write it as (x,y) = (h, k) + t(1,0) + At2 (0,1). At first this seems an insignificant change, even making it more complex, but whether this was done immediately, or somewhat later in the sequence, as I will try to show, there are advantages to having a pair of perpendicular unit vectors in the equation.

The first obvious advantage is that transformations no longer have the confusing sign reversal in translation of a graph (“to move the vertex three to the right, you replace x with x-3”). To move the graph to the right, simply increase the value of h, the x-coordinate of the vertex.

What about the other things we normally do with quadratics? To solve y=0 or find roots we still want to find where y=0, so k+At2 = 0. If we confine ourselves to dealing only with quadratics that are functions of y in terms of x, then the entire section on quadratic equations and completing the square (except for their historical interest and geometric interest) is now resolved by the simple two steps of setting and then finding the values of x from x=h+t. For reasons that will be more obvious later, however, we still need to develop the traditional approaches to solving quadratics.

It would seem that a little more time and emphasis on converting the general y=Ax2 + Bx + C form to the vertex form would be essential, but the savings in other areas and the increase in understanding would seem obvious.

To find values of y as a function of x, the simple expedient of solving for t makes the mysterious reversal of sign for transformations in the old form seem obvious. We change x=h+t into t=x-h; and then evaluate y=k+A(x-h)2 just as we always have. Perhaps the exception to “as we always did” is that a student now understands a little better what s/he is doing.

So what can we do we couldn’t do before? Suppose we now want to write the equation of a parabola that is not expressible as y=f(x). As a simple example, I will show how to easily write the equation of a parabola with a standard curvature (A=1) with a vertex at (2, -3) an the axis of symmetry rotated 45o.

It is for this problem that I think the three part, (x,y) = (h, k) + t(1,0) + At2(0,1), model is needed. All we need to do is replace the two unit vectors in the x and y directions with the appropriate unit vectors. Since the axis is rotated 45o, we need the old x-axis to go in the (1,1) direction. The unit vector in that direction is and the perpendicular to that would be . We simply fill in the appropriate values for the vertex and the equation is . The graph, using the parametric form in Winplot, looks like this:



To find a point of specific interest, say the x-intercepts, we can solve for t as before. Setting y = 0 we have we have a typical quadratic to solve for the two values of t, we get approximate values of –2.619 and 1.169. Then to find x we evaluate for these values of t with approximate results of x = 1.29 and x = -4.702. Solving quadratics in the traditional form will not go away.

With very little extra effort on the student’s part the student can extend this to drawing a quadratic embedded along any line in any plane. I will try to develop that in the next section of these vector blogs.

Wednesday, 9 June 2010

More on Vectors in the HS Curriculum

Several colleagues took me to task privately, and unjustly I think (he whined), for suggesting that more stuff (vector topics) should be added to the (already overstuffed) curriculum. My idea was neither to replace the traditional y=f(x) approach commonly used, nor to introduce multiple chapters in vectors throughout the curriculum strand. Instead, I think the integration of a few “15 minute vector asides” at a number of places each year would have the potential to greatly enrich a student’s ability to do those big ideas in math, generalize, synthesize and specialize.

Distance is an abstract concept that is introduced as early as fifth or sixth grade for the number line (maybe earlier) and by grades seven or eight for the coordinate plane. Ok, I’m ready to let the fifth graders stay with Pt A –Pt B for distance on the number line. For the coordinate plane, the usual approach is to resort to a memorized “distance formula” that few of them ever realize is the Pythagorean theorem. Even fewer naturally extend that to three-space, although I admit that would seem pretty trivial. If at about this moment we gave a very brief introduction to vectors The “vector” from Point A to Point B is (B-A). Kids could use vectors to translate points on a two-or three-d grid and immediately realize the relationship between the vectors [3,5] and [-3,-5] . I would think within a single days lesson, most students could write the vectors between points in two-space and three space (how often do grade 6-7-8 students see a three dimensional point, I wonder.). Then the square root of the dot product is an easy way to define distance, and it is immediately defined for ALL dimensions. By day two, students can be finding distances between points in the room located with coordinates in feet or meters and an origin established at one corner of the room. The same students would, I suspect, immediately see slope as a “vector” relationship (although there will always be kids who get hung up on the order, x over y / y over x, as they do now).

One of the places I notice a need for at least a “vector translation” understanding of a line segment shows up in the frequency with which Alg I and II students are asked to find the midpoint of a segment (there is probably even a “midpoint formula” in the book) but are almost never asked to find the point 2/3 of the way from A to B. One leads to a view of math as using rules, and another as using ideas. My goal is to move away from the former and towards the latter.

addendum Addendum to “proportion of a line segment”.
----------------------------------------------------------
In a similar way, many students are taught to find the centroid of a triangle, usually by a memorized relationship. The student who can understand and apply the use of a vector approach to lines will be able to see that any point on the plane determined by triangle ABC can be represented as a linear combination P= ra + sb + tc with r+s+t=1 . Again, many students are more at ease with representing this linear combination as P=a + s(b-a) + t( c-a) since it can be seen visually as a translation from the origin to point A, then motions parallel to the two sides meeting at A to locate the point.
------------------------------------------------------------------


Somewhere in the Alg I/Geometry sequence, they come to that point where they are given three consecutive points on a parallelogram and asked to find the fourth point. I cannot imagine many kids being successful at this who do not take a more-or-less vector approach to the motion along the segments of the parallelogram. But once they see a vector approach to “moving” a point; and if they were familiar with 3-d coordinates, how long would it take to give them four non-coplanar points representing adjacent vertices of a parallelepiped and have them find the other four points.

If we look at two sides of a triangle as vectors, call them a and b, and think of the third side c as the vector a-b, then the square of the length of c is c . c. But replacing c with a-b we get (a-b) . (a-b) and distributing we get a . a + b . b – 2 a . b and keeping in mind that a . b = |a| |b| cos(theta) we have the law of cosines . The distributive nature of the dot product gives the law of cosines as a simple application of the distance formula. And if a and b are perpendicular, their product is zero, and so the Pythagorean theorem also pops out.

A geometry student with an understanding of the dot product can show easily that the sum of the squares of the sides of a parallelogram is equal to the sum of the squares of its diagonals. If we represent the two sides at Point A as vectors a and b, then the diagonal AC is a+b, and the diagonal BD is b-a. The dot product of w=a+b with itself gives |a+b|2= |a|2 + |b|2 + 2(a.b).
The same approach with v=a-b gives |a-b|2= |a|2 + |b|2 - 2(a.b), and summing the two we get the result that |v|2+|w|2 = |a|2 + |b|2+|a|2 + |b|2 and substituting in a1 and b1 in one pair gives the final result. Understanding the distributive law removes the necessity to use the memorized law of cosines. (I would love to have a student respond that they didn’t remember the law of cosines, but given a moment they could reproduce it.

As a sidebar, I would add that like my recent post about Almost Pythagorean relations this one qualifies as both also Pythagorean, and also as one of those special cases where two wrongs make a right...ie. for sides a, b, c, and d of a parallelogram with diagonals d1 and d2 it is NOT true that a2+b2=d12 and likewise for c2+d2=d22, but when both equations are added together, the result is true.

A geometry course rich with vector topics would seem to make three-dimensions a much deeper part of the course. It would also, as I hope to show in subsequent posts, allow us to easily extend some of the things we do in two-space.

Sunday, 6 June 2010

Almost Pythagorean

Years ago when I taught in Michigan I often gave talks on a collection of "Almost Pythagorean" relationships... things that reminded me of the classic. At one time I must have had a dozen or so, but I found a new one today on one of the blogs I follow.

Arjen Dijksman is a Dutch Physicist whose blogs often tease out relations between physics and geometry,but his recent post is on the "Lost theorem about angular proportions"

The property applies to any triangle in which one interior angle is twice another. Some beautiful extensions of chords in a unit circle produce a proof, but the part I liked was that if the sides and angles are labeled as shown :

Then a2= c2+bc

addendum, I noticed a couple of days after I posted this, that if you draw a segment call it d, cutting the angle formed by c and a so that c and d form the legs of an isosceles triangle, then the other triangle is also isosceles. One triangle with base angles of 2 theta, and the other with base angles of theta.

More Cows... More Math

Well, I did it. A long layover in Chicago and a trans-Atlantic flight left plenty of time to wander through Ian Stewart’s “Cows in the Maze, and other mathematical explorations”. Even with pencil and paper time for a few problems…. But Don’t read it that way… Every chapter offers two or three different but related topics that can be the start of a wonderful mathematical exploration. Plow into them… if you get stuck,,,, read the clues… go to the web references, and in the end, read the answers at the end of the chapter, and then, check the “Further Reading” for each chapter at the end of the book.

I read lots of math books, and yet I kept finding new topics, or new information about old topics I thought I was up to the date on, or a twist I had never seen… it is the kind of stuff that makes a wonderful introduction for the new fan of recreational math, and a wonderful update for those of us who are…ummmm … a little older…. Remember HEX… Stewart rightfully suggests that it is time to re-introduce it to another generation. And you probably have read plenty about knot theory, but now they are playing with a new approach… applied knots so to speak…. Hey, if you don’t know a granny knot from a reef Knot, this is the place…. From Cats Cradle to the Cows in the Maze logic game for which the book is titled, good reading…. Good math…. Check it out.

Wednesday, 2 June 2010

Cows in the Maze

Mathematics is SO SERIOUS, that we all need to chill out a bit, and stop getting so uptight about decimal points and fractions and parallelograms." (Ian Stewart)

I just received a copy of Ian Stewart's "Cows in the Maze, And Other Mathematical Explorations" to review from Michelle Rafferty at Oxford University Press. I haven't read it all yet. I'm saving that for the long trip back to England this Friday, but I did thumb through it and got distracted repeatedly by interesting topics. The book is from Stewart's articles in Scientific American. I will save a fuller review, but will advise at the onset that it looks like a wonderful gift for a math student graduating from high school this month.



I do want to mention a topic(game) from the first chapter, which is on dice and dice games. I read a lot of math books, and yet I had never seen the game mentioned. I am going to slightly alter the game (Me altering Stewart's games is like telling Ichiro to try a different stance at the plate to improve his hitting, but hey, here I go)
So here is the idea, and a challenge. A point target is determined, say 15, or 21, or any number that sounds good to you; and a single die is rolled (it doesn't matter by whom). The number showing is the starting value for the running total. Each player in turn will give the die a quarter rotation in any of the four possible directions (for example, if a 1 is on the face, a quarter roll might bring up a 2,3,4, or 5, but not the six on the bottom).This number is added to the running total. The first person who goes over the set target value is the loser (alternate game, make him the winnner).

And my question is... given that each player plays intelligently, is there an advantage to one or the other player based on the value of the opening roll?

Tuesday, 1 June 2010

Given Two Points????

Each year in the spring my pre-calc kids come to the four brief sections in our text that deal with parametric equations and vectors. (I think of this chapter as the catch-all chapter, anything we might have missed that is in the California or Texas Standards).

And then I throw in about three more weeks of work about vectors that I created because I think it is a)beautiful and b) really important. And I share with my students that it seems incredible to me that they, the best and brightest mathematics students in our school, are nearing the end of their high school education (many are seniors) and they can't do one of the most simple acts of coordinate geometry; that is, "Given two points, write the equation of a line containing the two points" (How does the standard for your school read?).

They look at me in wonder, confusion, and perhaps some doubt of my sanity. After all, we have done that thousands of times. I continue to bemoan their lack of ability until finally someone will challenge me...."But, Mr. B, we CAN do that. We do it all the time."

Ok, We'll see, and I turn and write two points on the board... such as (3,1,2) and (2,4,3).

They are so sure of their ability that they already have their pencils to paper when they realize they have no idea how to begin. I let them talk, explore, suggest ideas, and I wait, and I wait.... I have never had a student come up with an equation. Some will suggest it must be something like z=ax+by+c or something..... but NOT ONE ever hit upon a correct equation of the line in question....

Then we talk... Not about how to, that will come later, they will discover it on their own as a natural generalization, but about why not..

I admit to them that most of the students who graduate from high school (and in fact, many of the math teachers they have studied under) can not do this simple act of writing the equation of a line in the three space dimension that they live in. And I tell them that in the following weeks they will learn to do some of the simple geometry they know in the dimension they live in.

I walk them through a simple vector approach to lines in the coordinate plane. We take y= 3x-1 and rewrite it as (x,y)= (0,-1) + t(1,3). Within minutes every kid in the class can write the equation of a line given two points in this vector form although a few struggle with the seeming reversal of order of the "slope"(in truth, several still mess up regularly when they try to use slope intercept, yet they seem reluctant to adopt the seemingly easier point-slope form).

They are quickly taking two points and talking about "point vectors" and "slope vectors" as if they had used them forever. And each year it startles me anew that after a half-hour of an alternate approach, every student will intuitively generalize the method to produce a three-space equation of a line without any help...and then with a little faltering over the "fourth" variable, they can do the same thing in the barely imaginable four-space.

Later we will write the equations of planes in space given three points and do some simple analytic geometry in three space. Many of them struggle with the idea of projections of lines and minor details, but I at least feel like I have made a small step to preparing them to function mathematically in the three-space they live in. And if the string-theory guys are right, and we really have a ten-dimensional universe.... no big deal, they can extend vectors to any dimension.

But I wonder each year... why are we not introducing this more at an early age (alg I?). I will talk later about some of the advantages I see, and maybe you can tell me what I missing that would make it a bad idea.