Showing posts with label vectors. Show all posts
Showing posts with label vectors. Show all posts

Wednesday, 22 September 2010

Why -1 < r < 1

The formula for the correlation coefficient, r, in the AP Statistics hand out is given as .

The student is then expected to see that the value of r is always in the interval between -1 and 1 inclusive. The fact that this is not even remotely obvious to the new student is indicated by the frequency with which this question is asked by AP Statistics teachers on the AP electronic discussion group. Because my stats course is still a mathematics course, I would like for my students to develop some understanding of the reason, rather than just accepting it is true because “the teacher said so.” Toward that end, and because I believe vectors are undernourished in the current curriculum, I tend to explain the reasoning using the dot product of vectors. Because of the number of equations involved, I have stored the paper (in docx format) here.

One reader also requested the link to the blog on Standard Deviation as Distance..

Monday, 12 July 2010

Standard Deviation as Distance

Early today I had a conversation with another HS stats teacher that reminded me that when I was writing about vectors a while back I had not covered two nice uses in Stats. I hope to correct one of those today.

As we were talking I bemoaned the fact that few introductory textbooks seem to really help kids to develop any intuitive idea of what the standard deviation is or how it works. As we talked, I mentioned that I thought there was a geometric approach to the standard deviation that might help make it more clear. You be the judge.

I think the standard deviation is most easily approached as a distance (more specifically a sort of average of distances). Most high school stats students can quickly find the distance between two points on the plane using the square root of the sum of the squares of the differences (deviations) in each direction (dimension). For those who have never been introduced to it, only a few moments convinces them that it can generalize to n-dimensions. And in a few short minutes they can be finding the "distance" between (point)vectors in any number of dimensions, and many can quickly invent a shortcut to the calculation using the list functions of their calculators.

So why does the standard deviation as a distance make sense? The standard deviation is a measure of how much the data items "disagree" with each other. Start with two measures, and for the moment we use the unconventional notation of calling one of them x1 and the other y1. Now if they agree perfectly, then they lie on the line y=x. If they don't, then they will be off the line by some distance. We begin by finding that distance. The perpendicular from the line y=x to the point (x1 ,y1) would cross y=x at the point where the x and y values were the average of x1 and y1, or at a point we call (xbar,xbar). That means the distance of the point (x1 ,y1) from the line y=x is just

Now if all our data sets had only two values (and statistics was REALLY EASY) then we could use this "distance" measure as a "standard measure". But one of the funny things about distance is that it grows with dimension, "sort of"... here is what I mean. In one dimension, the distance from (0) to (1) is one unit. In two dimensions the distance from (0,0) to (1,1) is farther, it's the square root of two. In three dimensions the distance from (0,0,0) to a point one away in each dimension is the square root of three. This would meant that the data set {1,3} would seem to be "less spread out" than {1,1,3,3}, which seems like a bad thing. To compensate, we simply divide this Pythagorean distance result by the square root of the dimension.

In effect then, the standard deviation of a population of values is the distance between the n dimensional points A={x1,x2,x3..xn) and B= (x-bar,x-bar,.... x-bar) divided by the square root of n. In truth, it would seem there was no need to memorize a formula when the student understands it as a "mean distance".

As a happy coincidence, John Cook at The Endeavour web site just posted a blog about the relationship between vector geometry and statistics when finding the standard deviation of a sum or difference of two distributions. A must read for intro stats teachers who want to be able to explain what happens (and why?) when the distributions are NOT independent.

Thursday, 10 June 2010

Vector Topics for Quadratic Equations

Revising and editing some old posts(2010).  As always, your comments are desired.


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.

Let's pick a simple example and use it to transform and illustrate the work  as we go, y = x^2 -5x - 6   .

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.
So in vertex form, we write our sample equation as \( y=(x-5/2)^2 - 1/4 \).  The vector form is (x,y) = (5/2, -1/4) + (t,t^2) , with the extended form of (x,y) = (5/2, -1/4) +t(1,0) + t^2 (0,1) . ( I think students could make this translation quickly because it is similar to the elements of the basic quadratic equation form.)


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.
Notice how separating the  x and y components of the vector make this easy.  With our example case, we set \( t= \sqrt \frac{1/4}{1} = 1/2.  
evaluating  (x,y) = (5/2, -1/4) +1/2(1,0) + (1/2)^2 (0,1) = (5/2, -1/4) +(1/2,0) + (0,1/4)= (3,0).  By symmetry we know the other zero is (2,0).  

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) + At^2(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 the plane, at any point. 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.

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.

Thursday, 3 December 2009

The Shoestring Explained




One of my students got too little sleep last night because he kept trying to figure out why the shoelace algorithm worked. One of those really bright kids who transferred in and just hasn't had an education up to his potential. He has never been introduced to vectors, so after a very cursory overview of the idea of vectors and cross products, I showed him the following as a way of "explanation". He had seen determinants in Alg II but never used to find area.



If we take the the set of vertices and add one more point at the origin, then we can draw vectors from the origin to each pair of consecutive vertices. In the first image we have drawn the vetors [1,1] and then [5,2], and we show the triangle area formed between the two vectors. The Determinant of the two vectors will give us twice this area. If we imagine the area being swept out by the first vector rotating until it reaches the second, a rotation of a positive direction will give us a positive value for the determinant, and a negative rotation will give us a negative value. Since we started at (1,1) our first area is negative, and equal to or -3/2.


As we proceed in order from vertex to vertex, the vector triangles will add and subtract areas as it sweeps around the polygon until it gets back to the starting point. The Vectors from [5,2] ot [4,4] add back the area just subtracted in the first pair of vectors, and also the area inside the polygon formed by triangle BCD (this is just by chance because vectors AB and AD have a common slope)



The next pair of vectors add the rest of the polygon, but also some excess in the amount of triangle ABE. This excess is removed when we sweep back to the original point A and so we have the final area of the polygon.

If we had traversed our way around the vertices in the reverse order, the determinants would have all had their signs reversed and we would have a total which was the negative of the actual area. Hope that is pretty clear, there was a lot more armwaving when I was doing this at the board.

Tuesday, 17 February 2009

Why Bother with Vectors?



The question in the title came from a fellow teacher who had set in on a class in which I was laying the first foundations of what would be several weeks of focus on vectors. Here is part of an answer:

Teacher: So, you took a year of geometry and two years of algebra, right?
student: That's right, Sir (my kids talk nice)
Teacher: So what can you tell me about any two points in space?
Student: Well, they determine a line, I guess..
Teacher: Good, and if I gave you the coordinates of the two points, could you write the equation of the line?

Student: (enthusiastic now, been here, done this)... Sure!

Teacher: Ok, let one be the point at (1, -2, 7)... and the other be at (3, 1, 5)
Student : (totally confused, now).. Huh... what is that.. you have too many numbers...

Ok, that never happened, but if you want it too, just repeat the teacher part with any bright Pre-calc student and I bet they will fill in the details, maybe even with the "Sir" (or Mam as the case may fit)...

I have wondered for a long time at the overemphasis of the slope-intercept form and the almost total exclusion of functions of more than one variable. So for the next few blogs, I'm going to talk about things you can do easily with vectors that seem difficult or impossible without them (or something like them)...

I think, based on my own experience with students, that it takes very little extra time to take a student from the two dimensional slope interecept form to a vector form of equations that will extend to as many dimensions as the student may ever encounter.. (I assume that number will be finite). Some teachers will suggest that there is not any real difference beween my vector form and what is commonly called parametric form of equations, and I agree, as long as all you want to do is write the equation of a line; but I hope to show in the next few days that mixing vectors, matrices, and the traditional equations of planes can quickly expand the level of three dimenisonal tasks that a student can answer.

Today I want to show that writing the equation of a line with vectors is really as easy as using slope intercept, and may actually make more sense in some ways to the students. Before we jump into three space, we might try to win the student over with a two space example..... for example, suppose we want to write the equation of a line though the points (3,1) and (1,-2) in the X-Y plane. First we find the slope, like always... and it turns out to be 3/2 (what do you say to the kid who writes -3/-2)... Then we can use the slope and one point to write the equation as y-1 = (3/2)(x-2) ...(I walked around an Alg I class today as they were being shown this method, and while the rule and an example were on the board, about 1/3 of the student's whose shoulders I peered over had reversed the x and y coordinate values on the subsequent example ...we drill it into them that x comes before y... hmmm)

I think the kid who really knows what is going on, when asked to graph this line will go to the board, mark the point (3,1) (or perhaps (1,-2)) and then count over two to the right, then up three, and make another point. They might repeat this a couple more times, then sketch a line through the points drawn... To most kids, the line goes "over 2, up three". What if we actually let them write it as [2,3] . [after a couple of examples, we might ask the student how long is the line segment between the two points... wait... see how long it takes them to notice that the two legs are right here in the vector) We could define the line as the set of all points (x,y) so that (x,y)=(3,1) + t [2,3] (there is absolutly no reason mathematically to write the point in parentheses and the slope (vector?) in brackets, but I think there is pedagogically). Now imagine that a classroom full of kids had been trained to write the two-dimensional equations as shown, and then we say... hey guys, suppose we want to write the equation of two points in space, with points (x,y,z)... between the two points at (1, -2, 7)... and at (3, 1, 5). I can tell you that in my experience working with Alg II and Pre-calc kids, they automatically extend the method naturally..... almost every one of them... and when I go really crazy, and ask them to write a line between two points in four space, over half the kids in class are wagging hands to get a shot at the board. And when I ask them the distance between the two points, there is almost never a question about whether the Pythagorean method applies... vectors is vectors, baby!

Down the line, I think there are some great modifications. If we develop the practice of writing the slope vector (I call it that becuase they learned "slope" first, but it could easily be called the translation vector) as a unit vector. The variable t suddenly takes on the additional value of indicating the distance away from the original point in the vector direction; substitute in t=3, and you get the point 3 units away..etc. Now we ask them to find the point three-fifths of the way from point A toward point B and they write A + 3/5 [B-A] almost without instruction; and yes, they will know what to do if you ask for it the other way around.

There are some heavy ideas you might want to explore here that you could almost never touch using the traditional equations. Imagine giving your students the coordinates of a triangle in three space and have the students find the point where the medians intersect. Later with dot and vector products, and a little work with matrices to find solutions to systems of equations, we will find the equation of a line along the intersection of two planes, the foot of the perpendicular to a tetrahedron etc.

Someone who is really good at linear algebra could probably point out fifty other little tasks that are easy to do in three-space with vectors and matrices.. (and I would love to hear from you)... But for now, try introducing some vector equations of lines to your kids.. I bet they can pick it up in one class period, and it is a natural companion to parametric equations (which is the area of the curriculum I use to justify the very little time I go off task on three space vectors and matrices)

Stay tuned... Next I'll write use the dot product to find the angle between two lines or segments in space.

Monday, 16 February 2009

The Cheshire Math Curriculum


In a note to the Philosophical Magazine (January, 1846) by Professor J.R.Young of Belfast College, Working with the sum of infinite series he refers to the "evanescence" of xinf when x < 1.. One of the things I love about old Math journals is the beauty of the language used. For those who may not know the word, it means to slowly disappear, to vanish.

I was reminded of this quote recently thinking about the evanescence of many of the ideas once common to the high school curriculum. I recently had a math teacher who teaches Alg I tell me that factoring was not in the curriculum for her students, and she would not be teaching it. I know many others for whom, although it is still in their curriculum, it will not be taught because they don't see a use for it. In a blog a teacher of introductory students in a community college stated, almost smugly, that they had never learned the quadratic formula. The apparent implication, "It is not needed because I don't use it and I'm the teacher."

I recently wrote some blogs about synthetic division, including a few things that some folks had said to their classes "can't be done" and received several notes reminding me that it was a waste of time, because they could just use long division.... BTW, guess what is being de-emphasized in elementary school these days...... evanescence...

Last year I noticed that Descartes Rule of Signs had essentially "evenesced" out of my Pre-calc sequence. The term and the idea are both absent from my new algebra II book, and appears only as the last problem (number 73) in an exercise set in the current Pre-calc/analysis book.

A brief treatment of vectors is still present, but seeming unsteady on legs as wobbly as a punch-drunk fighter. No vector equations (nor parametric if you see them as I do as almost interchangeable) in three space, although there is a unit on two space parametric equations to accomodate a few questions on projectile motion.

For most of the year I squeeze these in as extra items, one this week, one the next, so that by the time we get to this time of the year I can give a full couple of weeks to vectors and planes in three space and my best students will actually be able to write the equation of a line of intersection of two planes; or the foot of the altitude of a tetrahedron from its four coordinates.

It's not in the curriculum, and I have no answer when someone protests that the students will "NEVER have to use that." Maybe they are right..I know that long ago when I was selecting classes in North Side High School in Fort Worth, Texas, I could not imagine any time in my life when I would need to speak French... (guess where I am going back to on Spring Break because Christmas there was so wonderful).. and I can't imagine anyone sitting around doing math, punching buttons on their calculator or ??? and they suddenly think to themselves, "I wish I didn't know how to factor polynomials, and I can't wait to forget how to do synthetic division