Tuesday, March 29, 2011

The triangle inequality and Heron's Formula with LOTS of practice problems.

In class, we discussed the Triangle Inequality, a way to check if three given numbers u, v and w, could possibly the lengths of the sides of some triangle. If the numbers are given in any old order, we have two inequalities to check.

u + v >= w
AND
w
>= |u - v|

Example: u = 6, v = 12, w = 4

6 + 12 >= 4 Yes, this is true.
AND
4 >= |6 - 12| No, this is false, so these three lengths cannot be the sides of a triangle.

Note: If you make w the long side no matter which way they are handed to you, all you have to check is if u + v >= w.

Let's do another example. u = 10, v = 12 and w = 6.

If we make the long side of 12 be w and the side of 6 be v, then all we have to check is
10 + 6 >= 12, and that is true. These could be the sides of a triangle.

If a triangle is defined for us by the lengths of three sides, the "easiest" way to find the area is Heron's Formula, named for the ancient Greek mathematician Heron, sometimes known as Hero. We add up the three sides to get the perimeter p, then we take ½p and call it s, the semi-perimeter. The area is the square root of the product

s(s - u)(s - v)(s - w).

Let's take the example of sides 6, 10 and 12. The perimeter is 28 and the semi-perimeter is 14. Our formula reads as follows
Area = sqrt(14(14-12)(14-10)(14-6)) = sqrt(14*2*4*8).
Factoring we get sqrt(7*2*2*2*2*2*2*2), which means we have three pairs of twins and one 2 that will be left under the square root sign. This gives us 2*2*2*sqrt(7*2) or 8*sqrt(14). If we want to round to the nearest thousandth 8*sqrt(14) ~= 29.933.

Practice problems . Someone in class asked for a LOT of practice problems so here goes. Here is a list of every possible combination of three positive numbers less than 4. The largest number will be listed last. If u + v = w, then it is a straight line segment with a point on the segment as the vertex. If u + v < w, it's not a triangle at all and only if u + v > w do the three sides create an actual triangle with area.

Part 1. For all these examples, determine if the lengths can create a triangle (answer YES), a straight line (answer STRAIGHT) or not a triangle (answer NO).

a) 1, 1, 1
b) 1, 1, 2
c) 1, 1, 3
d) 1, 1, 4
e) 1, 2, 2
f) 1, 2, 3
g) 1, 2, 4
h) 1, 3, 3
i) 1, 3, 4
j) 1, 4, 4
k) 2, 2, 2
l) 2, 2, 3
m) 2, 2, 4
n) 2, 3, 3
o) 2, 3, 4
p) 2, 4, 4
q) 3, 3, 3
r) 3, 3, 4
s) 3, 4, 4
t) 4, 4, 4

Part 2.
For every triplet of numbers that is a triangle, find the area as a square root and rounded to the nearest thousandth.

Answers in the comments.

Friday, March 25, 2011

Distance, Slope and area of a triangle given two points and the origin (0,0)


The idea of putting horizontal and vertical coordinates on points on a plane is about 400 years old now, and much of the credit goes to mathematician and philosopher René Descartes, working with the amateur mathematician Father Marin Mersenne. The name Cartesian coordinates comes from Descartes' last name. Instead of using a lot of different letters for the coordinates, we will be using subscripts for points, such as (x1, y1), (x2, y2), (x3, y3), etc.

Distance between points: The distance formula is really The Pythagorean Theorem. Our coordinate system makes it easy to create a right triangle between any two points that aren't on the same horizontal or vertical line. (If they are on the same horizontal line, then y1 = y2. If they are on the same vertical line, then x1 = x2.) The horizontal leg of the triangle has length that is the absolute difference |x1 - x2|, and the vertical leg has length |y1 - y2|. The sum of the squares of the legs is the square of the hypotenuse, so we take the square root to find the distance.

Slope: Slope is a number which defines the steepness of a line segment by rise/run, which means the difference in y divided by the difference in x. Any time we have a fraction in a formula, we have to be careful that the denominator is not zero, because we are not allowed to divide by zero. (Quick mnemonic: 0/K is okay because it's zero, N/0 is no can do.) The formula can be written as (y1 - y2)/(x1 - x2) or (y2 - y1)/(x2 - x1). In other words, it doesn't matter if you put the coordinates from point 1 first or the coordinates from point 2 first, AS LONG AS YOU ARE CONSISTENT.

A slope of 0 means the y coordinates are equal and the line is horizontal. A positive slope means the line is "uphill" as we go from left to right and a negative slope means we go "downhill" as we go from left to right. The larger the absolute value of the slope, the steeper a line is. A vertical line has no "run" because the x values are the same, and that means dividing by zero, which we have already said doesn't work. A vertical line has undefined slope. (Sometimes people will say it has no slope, which is technically true but it sounds like the slope is zero. As much as possible, I will used the phrase undefined slope to try to avoid this confusion. If you put "no slope" as an answer when it should be "undefined slope", expect to get a half point marked off.)

The area of a triangle defined by (0, 0), (x1, y1) and (x2, y2): You may have learned that the area of a triangle is 1/2 the base times the height, but sometimes you aren't given the base and the height and other formulas are used instead. If given three coordinate points and one of them is the origin (0, 0), the formula for the area is ½|x1y2 - x2y1|. The absolute value sign is necessary because area, like distance, is usually thought of as non-negative. I write "non-negative" instead of "positive" because if you pick three points at random, it's possible you have three points that are all on the same line, which we call co-linear, and if that happens, what you draw is not really a triangle but instead a line segment, which would mean the base exists but the height is zero, so the area is zero.

Example: Consider the points (7, 1) and (-2, 3).

Distance from (7, 1) and (-2, 3):
sqrt((7 -(-2))²+(1 - 3)²) = sqrt(9² + 2²) = sqrt(81 + 4) = sqrt(85).
(note: 85 is 17x5, so it is a square free number and can't be simplified.)

Slope of the line that runs through (7, 1) and (-2, 3):
(1-3)/(7-(-2)) = -2/9. This means a downhill slope, and every time we move 9 units to the right, we move 2 units down. (Conversly, if we move 9 units to the left, we move 2 units up.)

Note: if we switch the points and write the fraction as (3-1)/(-2-7), we get 2/(-9), which is still -2/9.


Area of the triangle with vertices (0, 0), (7, 1) and (-2, 3).
½|7*3 - 1*-2| = ½|21 -(-2)| = ½|23| = 11½ or 11.5. If we have all points that have integer coordinates (known in the literature as lattice points), then the area will be a whole number or a whole number + ½.

Further problem on triangle area: What if we have three points but none of them is (0, 0)?

In this case, pick one of the points and subtract its x value from all the x values AND subtract its y value from all the y values. What this does is rigidly move the original triangle to one of the exact same size and shape that does have a point at the origin (0, 0). The selection of the point is arbitrary and the area will be the same no matter what point is chosen.

Example: What is the area of the triangle formed by the points (7, 6), (2, -1) and (8, 14)?

I'm going to pick the point (2, -1) to be the point that gets moved to the origin because 2 and -1 are small and easy to subtract from the other values.

(7-2, 6-(-1)) = (5, 7)
(2-2, -1-(-1)) = (0, 0)
(8-2, 14-(-1)) = (6, 15)

The area of the triangle with vertices at (0, 0) , (5, 7) and (6, 15) = ½|5*15 - 7*6| = ½|75 - 42|
= ½|33| = 16.5 or 16½.

Practice problems:

a) Find the distance between (9, 4) and (-1, 2).
b) Find the slope of the line that connects (9, 4) and (-1, 2)
c) Find the area of the triangle with vertices at (0, 0), (9, 4) and (-1, 2).
d) Find the area of the triangle with vertices at (12, 7), (9, 4) and (-1, 2).

Answers in the comments.

Wednesday, March 23, 2011

Simplifying and approximating square roots.

In class, we worked on simplifying square roots, which means taking sqrt(n) and turning it into a x sqrt(b), where b is a square free number. We used what I call the prison break method, where a pair of twins under the square root sign can make a break for it, but only one gets out and the other is shot trying to escape. (Thanks, Mrs. Kruger!)

sqrt(20) = sqrt( 2 x 2 x 5), so one of the pair of 2s can be brought out, while the 5 stays inside.

sqrt(20) = 2 x sqrt(5)

We can also go to our calculator and get an approximation of sqrt(20) = 4.472135955..., a decimal number that continues on forever and never gets into an infinitely repeating pattern because it is an irrational number. If we round, we get an approximation of sqrt(20), but the idea is that sqrt(20) = 20 exactly, and the approximations won't be exactly 20 when we square them.

sqrt(20) rounded to one place after the decimal = 4.5
4.5² = 20.25

sqrt(20) rounded to two places after the decimal = 4.47
4.47² = 19.9809

sqrt(20) rounded to three places after the decimal = 4.472
4.472² = 19.998784

Approximating to three places after the decimal is fairly standard, since the square of that approximation is usually off by less than a hundredth. For example,

sqrt(999) = 31.60696126... or 31.607 approximated to three places after the decimal
31.607² = 999.002449

Practice problems.

For the following square roots, simplify and approximate to three places after the decimal, then find the square of the approximation.

sqrt(72)

sqrt(73)

sqrt(74)

sqrt(75)

Answers in the comments.

Thursday, March 17, 2011

Square root practice.

The square root sign is not available with the editor for Blogger (not an extended ASCII symbol is the nerdy explanation), so I will be writing sqrt(n) to indicate the square root of n.

The Pythagorean Theorem tells us that a² + b² = c², where a and b are the short sides of a right triangle, called the "legs", and c is the long side opposite the right angle, known as the "hypotenuse". This means since the square of the hypotenuse is equal to a² + b², the hypotneuse itself is equal to sqrt(a² + b²). What this means is we can find the square root of any number that is the sum of two perfect squares. Here are some examples.

If the legs are 1 and 1, then 1² + 1² = 2 = c², so c = sqrt(2)
If the legs are 1 and 2, then 1² + 2² = 5 = c², so c = sqrt(5)
If the legs are 1 and 3, then 1² + 3² = 10 = c², so c = sqrt(10)

We can also re-arrange the equation to a² = c² - b², which means we can find the square root of any number that can be written as the difference of two squares.

If the hypotenuse is 2 and one of the legs is 1, then 2² - 1² = 3 = a², so a = sqrt(3)
If the hypotenuse is 3 and one of the legs is 1, then 3² - 1² = 8 = a², so a = sqrt(8)
If the hypotenuse is 5 and one of the legs is 2, then 5² - 2² = 21 = a², so a = sqrt(21)

Here are some practice problems.

1) Make a right triangle that will have two whole number side lengths and one side with length of sqrt(7).

2) Make a right triangle that will have two whole number side lengths and one side with length of sqrt(18).

3) Make TWO different right triangles that will have two whole number side lengths and one side with length of sqrt(20).

4) Make TWO different right triangles that will have two whole number side lengths and one side with length of sqrt(50).

Answers in the comments.

Tuesday, March 15, 2011

Set theory practice.


I haven't put any set theory practice problems up on the website before because the editor software for this blog can't put up the symbols for union, intersection and complement in regularly typed sentences. So instead, I'm going to use the words union, intersect and -bar to take the place of those symbols. I'm also going to use A - B to mean A intersect B-bar, which means the stuff that is in A but is NOT in B.

U = {a, b, c, d, e, f}

P = {f, a, d, e}_____Card(P) = 4
Q = {c, a, b}_______Card(Q) = 3
R = {c, e, d, e, d}___ Card(R) = 3 (there are two copies of the letters e and d, but each only counts once)

Find the following sets and their cardinalities using the set operations we have learned in class.

P union Q = __________

Card(P union Q) = ______


P intersect R = __________

Card(P intersect R) = ______


P-bar union Q-bar = __________

Card(P-bar union Q-bar) = ______

(P union Q) intersect R = __________

Card((P union Q) intersect R) = ______

P union (Q intersect R) = __________

Card(P union (Q intersect R)) = ______

Answers in the comments.

Tuesday, March 8, 2011

Five eccentric 19th British mathematicians who started mathematical logic.

Mathematical logic got its first great boost forward in the 19th Century, though at the time there was little practical use to it.


George Boole is considered the originator of modern mathematical logic, so much so that the field is called Boolean Algebra. He wrote his important treatise The Laws of Thought in the 1850s.


Augustus de Morgan is another important pioneer. The ways to distribute a not sign ~ through parentheses are called de Morgan's laws.

~(p v q) = ~p ^ ~q
~(p ^ q) = ~p v ~q

He was one of the first professors at University College London, the first major school in Great Britain that accepted students who were not Church of England, which meant that Catholics, Jews, protestants of denominations other that Church of England and those who professed no faith whatsoever could get a first class education in Great Britain.



Charles Babbage was another British logician, and he wanted to take mathematical logic to the next step. He designed the world's first mechanical computers, the Difference Engine and the Analytical Engine, both of which were designed to run on steam. Problems arose when trying to build the machines and neither was ever completed.



This did not stop Countess Ada Lovelace, the only legitimate daughter of the famed British poet Lord Byron, from designing programs for Babbage's machines. The Countess Lovelace was educated by de Morgan and is given credit as the first computer programmer. the language Ada is named after her.


The best known of the British eccentrics fascinated with logic in the 19th Century was Charles Dodgson a.k.a. Lewis Carroll. While still famous for Alice in Wonderland, he was also a mathematician, clergyman and photographer, and enjoyed putting together logic puzzles based on the ideas of syllogism using silly but logical statements. For example:

(a) No ducks waltz.
(b) No officers ever decline to waltz.
(c) All my poultry are ducks.

Therefore (d) None of my poultry are officers.



Here is also a link to the biographies of five 20th Century mathematicians who made great contributions to the field of computer science when it was much more practical.