Unit 1 Mega-assignmentSection 1.1
1. Multiply out the following:
(a) px ´ 2qpx ` 2q
(b) px ´ 2q2
(c) p3y ` 5q2
(d) p2z ` 1qp3z ´ 2q
(e) p4x ` 3yq2
(f) 3px ´ 4q2 ` 6
Section 1.2
2. (a) For what values of x is 2x ` 3 ą 7 ?
(b) For what values of x is 2×2 ´ 3 ď 15 ?
(c) For what values of y is 3y ` 2 ą 2y ` 3 ?
3. Solve the following equations:
(a) 12x ` 15 “ 75
?
(b) x ` 3 “ 4
(c) px ` 3q2 “ 4
(d) 12z ` 3 “ 8z ` 11
4. I bought a bunch of copies of a certain book online. The total bill was $80, each book
cost $4 and the shipping cost was $4.00. How many books did I buy. (You can figure this
out by just thinking or messing around, but write down the equation just for practice.)
5. One painter can paint a wall in 2 hours. A second painter can paint the same wall in 3
hours. How long does it take if they work together? (Assume they don’t get in each other’s
way, or form a union or something. . . Start by thinking about what fraction of the wall each
painter can paint in one hour.)
Section 1.3
6. Solve the equations:
(a) 3py ´ 3q2 ´ 48 “ 0
(b) px ´ 2q2 ` 5 “ 0
(c) 2pr ´ 13q2 ´ 72 “ 0
7. Solve the systems of equations:
(a) x ` 3y “ 7
2x ` y “ 4
(b) 2x ` 5y “ 1
3x ` 4y “ 5
(c) x ` 2y ` 4z “ 9
2x ` 2y ` 3z “ 8
x´y`z “3
8. John bought 3 apples and 5 bananas and spent $3.50. Mary bought 2 apples and 6
bananas and spent $3.40. How much did each apple and each banana cost?
9. José is 4 years younger than his brother Jorge. The sum of their ages is 26. How old is
each brother?
10. For each pair of functions f and g, calculate f pgpxqq and gpf pxqq.
(a) f pxq “ 3x ´ 2 and gpxq “ 2x ´ 3
(b) f pxq “ x2 ` x and gpxq “ 2x.
Section 1.4
11. Rewrite each of the following as P px ´ Qq2 ` R:
(a) x2 ` 4x ` 9
(b) 2×2 ´ 6x ` 3
(c) 4 ` x ´ x2
(d) 2×2 ` 1
12. Based on your answers to the preceding problem, solve the following equations:
(a) x2 ` 4x ` 9 “ 21
(b) 2×2 ´ 6x ` 3 “ 3
(c) 4 ` x ´ x2 “ 0
(d) 2×2 ` 1 “ 65
Section 1.5
13. Find the maximum or minimum of each of the functions in problem 11.
1
14. For what value of x is the sum of x2 and the reciprocal of x2 , i.e., x2 ` 2 minimized?
x
What is the minimum value?
Section 1.6
15. What is the dimension of the set of points where x ` y ` z ` u ` v ` w “ 6 and
x ´ y ` z ´ u ` v ´ w “ 0 ? Find three different points in this set.
Section 1.7
16. Give two “A equals B times C” situations other than those in the video or the notes.
17. Calculate
(a) lim 2
xÑ8
(b) lim 2 `
xÑ8
1
x
x
(This one is tricky!)
xÑ8 x ` 1
(c) lim
Section 1.7.1: A equals B times C.
We’re going to round out Unit 1 by returning to the good old two-dimensional plane, and
we’re going to consider a very innocent-looking equation, the equation A BC. We’re not
using x’s and y’s to write the equation just yet, because we’re going to take a few different
perspectives as to which letters represent constants and which represent variables.
We’re stopping to think about the equation A BC because it comes up so often in
applications. In fact, I’ll bet that if you think about it, you could come up with at least half
a dozen situations where, given the right names for the variables, A is equal to B times C.
Think about
Cost (or revenue) price times quantity
Distance velocity times time
Force mass times acceleration
Area (of a rectangle) length times width
Voltage current times resistance
Mass density times volume
In any of these situations, you can think of “word problems” where somehow you know two
of the three quantities and have to solve for the third.
Later on, we’re going to think about what happens when there’s a whole list of B’s and a
corresponding list of C’s — as when you buy a whole bunch of things at a store and multiply
the price of each item by how many of those items you bought.
But today, we’re going to turn the tables a bit on this equation, and think of B and C
as the variables and A as being given, so we’ll write A xy. Assuming that A is a positive
number, then x and y have to have the same sign to make the equation true. In other words
x and y are either both positive or both negative. And if A is not zero, then neither x nor y
can be zero.
So let’s pick a specific value for A, say A 4, and think about the graph of 4 xy.
It’s easy to think of a few points px, y q on this graph, such as p2, 2q, p1, 4q and p4, 1q.
But then there are points like p8, 21 q , p16, 41 q and p 12 , 8q and p 14 , 16q. Of course for every
point we find (other than p2, 2q), switching the coordinates will give us another point (by the
commutative law of multiplication! See how we’ve come full-circle!), which is reminiscent of
the { symmetry of the parabola around the vertical line through its max or min.
In fact p2, 2q is as close as the graph of 4 xy ever comes to the origin p0, 0q, in other
words x 2, y 2 minimizes the function x2 y 2 subject to the constraint 4 xy. But
that’s not exactly where we’re going, either (although that would make a good exercise for
those of you who watched the “bonus” video on max and min).
Instead of all that, we’re going to look at the graph of 4 xy (which we could rewrite
as y 4{x) and think about what happens when x gets very large or very small (meaning
close to zero but positive).
First of all, the graph — since xy is the constant 4, it makes sense that if x gets bigger
then y must get smaller to keep the product of x and y a constant. And think about it: If x
is bigger than 1 then y must be less than 4 to make the product work out. And if x is bigger
then 4 then y must be less than 1 for xy 4.
1
Let’s keep going — if x ¡ 16 then we must have y
. If x ¡ 100 then y 1{25. If
4
x ¡ 1000 then y 1{250 and so on. . . it’s apparent that the bigger x gets, the smaller (i.e.,
closer to zero) that y has to get.
We say that “the limit of y 4{x as x goes to infinity is zero”. This is an essential
concept, especially in calculus (aren’t you glad this isn’t a calculus course?). We write this as
4
lim 0. And it’s this notation that we want to stress in this lecture. In calculus courses,
xÑ8 x
the dynamic nature of the limit is the essential ingredient that enables the whole subject.
But here we’re only going to exploit the descriptive nature of limits.
We’re not going to worry so much about all kinds of exotic limits, but I simply want to
introduce the concept of a limit, particularly limits at zero and infinity, so they become part
of your mathematical vocabulary.
Before we go, though, a few remarks:
First, the limit is a complicated operation — there are several moving parts: First is
an expression or function involving one or more variables. And second is the idea that the
4
variables are approaching some “interesting” finite or infinite value. We’ve considered lim ,
xÑ8 x
but we could also consider limxÑ0 x4 . From the graph, this appears to be 8.
Sometimes, limits are obvious, such as limxÑ2 x2 4. But other times not so much.
x2 4
Can you predict lim
? Having a computer draw a graph might help, but so would
xÑ 2 x 2
some factoring and algebra.
There is a HUGE amount of mathematical literature concerning limits, but we’ll mostly
content ourselves with worrying about what happens if x goes to zero or infinity, and the
function goes to zero or infinity. This will be especially important as we consider probability
and statistical thinking later on.
For now, congratulations — you’ve reached the end of Unit 1. Be sure to complete the
“Mega-assignment” to prepare yourself for the Unit 1 Quiz. And then it’s on to Unit 2, where
we’ll be thinking about higher dimensions, and applying some of our max and min theory to
data analysis.
Until then!
Section 1.6.1: Functions (especially linear functions) of more than one variable.
We’ve been thinking about functions of a single variable — linear, quadratic, and later
we’ll look at some more exotic functions of a single variable.
But data science deals largely with functions that have several, or even many inputs or
variables. Even in our simple examples of the area of a rectangle or the cost of maintaining
an inventory we had to use two or even more variables to describe what was going on.
So we’re going to have to come to grips with the idea of functions with more than one
input variable. In some ways, they’re not so hard to understand from a purely algebraic point
of view, but we want to develop some geometric (in other words, graphical) intuition as well.
This is a bit more challenging.
We’ll take the first few steps toward that goal in this lecture, and think about linear
functions of more than one variable. But it’s a theme that we will come back to repeatedly
in the future.
Let’s start with a backwards look, at a linear function of one variable: Here’s a specific
one: y 4 2x. You know that the graph of this equation is a straight line that goes
through the point p0, 4q on the y-axis, and slopes downward as one moves from left to right
on the line.
This way of writing the equation of the line has the property, which is sometimes an
advantage, of expressing y as a function of x. But often, and especially in data analysis, we
want to treat the two variables x and y in a more even-handed way. One way to do this is to
move the 2x to the left side of the equation and write 2x y 4. This equation of course
represents the same line, but now x and y are on “equal footing”. We encountered this way
of writing a linear equation before, when we were solving systems of equations.
When we write 2x y 4, we’re treating the expression 2x y as a function of the two
variables x and y, so we could write f px, y q 2x y, and then the line is what is sometimes
called a “level set” of the function — the line contains all the points for which f px, y q 4,
and no others. If we change the 4 — say to 5 or to 2, then the line will change by moving
parallel to itself. For values of a bigger than 4, the line f px, y q a will be above and to
the right of the line 2x y 4 (and parallel to it), and for values of a less than 4, the line
f px, y q a will be below and to the left of 2x y 4.
One last remark before we jack up the dimension: writing the equation of the line as
2x y 4 gives us an easy way to find two points on the line so that we can graph it: If we
successively set x and then y equal to zero, then it’s easy to solve for the other variable. For
instance, if we put x 0 then the equation of the line becomes y 4, so the point p0, 4q is
on the line. And if we put y 0 then the equation of the line becomes x 2, so the point
p2, 0q is on the line. Then it’s an easy matter to plot these points and draw the line.
Okay, now here we go into the world of higher dimensions and more variables. Let’s go
from 2 to 3 dimensions first. A linear equation with the three variables x, y and z might
look like z 12 2x 3y. This is the equation of a plane in 3-dimensional space. Just as a
line in the 2D plane acts as a wall to divide the plane into two “half planes”, a plane in 3D
space acts as a wall to divide all of space into two half-spaces — like the net between the
two sides of a tennis or volleyball court.
We could write this as z f px, y q where f px, y q 12 2x 3y and we have the notion
of the plane as the graph of function of two variables. If we reason by analogy with the
equation of a line in the plane, the 12 should be something like the “z-intercept”, and it is.
It’s the value of z that corresponds to px, y q p0, 0q and the point p0, 0, 12q is on the z-axis.
The 2 and the 3 look like they should be slopes — and they are. The graph of a linear
function is a plane, and the plane can have different slopes in different directions.
Here’s a graph of the plane in 3D space
In the picture, z is going from bottom to top the axis is marked from 8 to 16 in the
picture. x increases as we go from back to front, and y increases as we go from left to right.
You can see that the slope of the line across the front of the box, which is in the y-direction is
more steeply downward than the line that goes from back to front on the right side, indicating
that the y slope is more negative than the x slope. More precisely, z decreases from 13 down
to 7 on the front of the box, as y increases from 1 to 1 — so the “y-slope” is 6{2 3
as it should be. It’s a little harder to tell from this picture, but z decreases from 11 to 7 as
you go from back to front on the right side (z also decreases from 17 to 13 as you go from
back to front on the left side of the box), as x increases from 1 to 1, which shows the
“x-slope” is 4{2 2 as it should be.
Now recall our “egalitarian approach” to graphing and working with lines in the plane,
where we put all the variables on the left side. If we do this with z 12 2x 3y we’ll get
2x 3y z 12. Writing it this way helps us draw the graph of the plane — by taking
two of the variables at a time to be equal to zero, we can solve for the other variable and
see where the plane intersects that variable’s axis. We already did this for the “z-intercept”
when x and y were zero to find p0, 0, 12q.
Likewise, if we put y 0 and z 0, we get that x 6, so the x-intercept is the
point p6, 0, 0q. And the y intercept is p0, 4, 0q. Using this we can plot these points on the
coordinate axes and then draw the triangle they span. A little 3D imagination is required, but
you can see that we get a pretty good idea at least of how the plane intersects the “octant”
where x, y and z are all positive.
We’ll continue to reason by analogy with planes. When we had a line in 2D, like 2x 3y
12, we knew that if we changed the 12 to another number but left the 2x 3y part alone,
the line would be moved parallel to itself. The same thing is true in 3D. If we change the 12
in 2x 3y z 12 then then plane will move parallel to itself. We can say that the plane
2x 3y z 12 is a “level surface” for the function of three variables f px, y, z q 2x 3y z.
More analogy: When we wrote down two equations in two unknowns and asked which
points px, y q satisfied both equations, we were looking at the intersection of two lines in the
plane, which is usually a single point.
If we write down two equations in three unknowns, then we are looking at the intersection
of two planes in 3D, which is (usually) a line:
If we want to get a single point, we need to intersect three planes:
There’s a general principle at work here, which I’ll state in a moment.
Before I do, though, I want to expand your perspective just a little bit more (or perhaps a
whole lot more). In data science, “points” correspond to individuals, or at least to individual
observations. And these observations might consist of many numbers — like the components
of a stock portfolio, a person’s vital signs, a student’s grades, etc. As such, the points live in
a space of many dimensions. So we have to summon our mathematical imaginations to think
about the graphs of linear functions in many variables, which will be “hyper-planes” — In
N -dimensional space, these are straight, flat geometric objects that form pN 1q-dimensional
walls that divide the space into two halves. So we could have an equation like
3×1
5×2 8×3
10×4
12×20
100
whose graph would be a 19-dimensional hyperplane in 20-dimensional space. The equation
imposes one condition that the coordinates x1 , . . . , x20 of a point must satisfy to be on the
hyperplane.
And here’s the really fun part. If you change the 100 in that equation and leave the other
side alone, then the hyperplane will move parallel to itself in 20-dimensional space. Moreover
usually (unless there’s some wacky coincidence with the numbers) every time you write down
another linear equation that the 20 variables should satisfy, you decrease the dimension of
the solution set by 1.
So if you write down 13 equations in 20 variables, you should expect the solution set to
comprise a 7-dimensional hyperplane in 20-dimensional space (they’re kind of like our lines
in 3-dimensional space, only weirder).
If you take a course in linear algebra, you’ll learn all about things like this. We’re going
to content ourselves for the time being with just thinking about the dimensions of things,
and getting our minds ready to take on truly multifaceted data.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more