WEBVTT mathematics/pre-calculus/selhorst-jones
00:00:00.000 --> 00:00:02.000
Hi--welcome back to Educator.com.
00:00:02.000 --> 00:00:05.500
Today, we are going to talk about systems of linear inequalities.
00:00:05.500 --> 00:00:08.900
In the previous lesson, we worked with systems of linear equations.
00:00:08.900 --> 00:00:12.100
In this lesson, we will work with systems of linear inequalities.
00:00:12.100 --> 00:00:16.600
Remember: equations are based on equals signs--left side = right side.
00:00:16.600 --> 00:00:23.200
But inequalities are relationships based on less than (I should perhaps use something different),
00:00:23.200 --> 00:00:28.000
less than or equal, greater than or equal, or greater than.
00:00:28.000 --> 00:00:32.900
Since we haven't really worked with inequalities before in this course, we will first have a brief refresher.
00:00:32.900 --> 00:00:38.800
After that, we will consider systems of linear inequalities and how their solutions are based on all the inequalities at the same time.
00:00:38.800 --> 00:00:45.800
Finally, we will see how systems of linear inequalities can be applied through linear programming, which will allow us to solve optimization problems.
00:00:45.800 --> 00:00:51.600
Let's go: when solving a linear equation in one variable, we always find exactly one solution.
00:00:51.600 --> 00:00:56.400
For example, if we have x + 1 = 0, we subtract by 1 on both sides, and we get x = -1.
00:00:56.400 --> 00:01:03.200
So, on the number line, we would see that the answer to this is when x is -1 on the number line.
00:01:03.200 --> 00:01:09.800
On the other hand, when we solve a linear inequality in one variable, we find an infinite variety of solutions.
00:01:09.800 --> 00:01:20.300
So, if we had x + 1 ≥ 0, we subtract 1 on both sides, and we get x ≥ -1, which means we have x equal to -1 as one of the solutions;
00:01:20.300 --> 00:01:23.600
but we also are allowed to go anywhere above that.
00:01:23.600 --> 00:01:29.200
+3 would be an answer to this; +52 would be an answer to this; -1/2 would be an answer to this.
00:01:29.200 --> 00:01:35.700
Everything from -1 on up is an answer to this--everything there will satisfy our inequality.
00:01:35.700 --> 00:01:44.600
This idea of a wide variety of answers will be important to us as we work with systems of linear inequalities, so we want to keep this in mind.
00:01:44.600 --> 00:01:49.200
Mostly, when you are doing algebra with an inequality, it is just the same as doing it with an equation.
00:01:49.200 --> 00:01:56.800
We can do any arithmetic operation--addition, subtraction, multiplication, and division--on both sides, just like normal algebra.
00:01:56.800 --> 00:02:05.900
However, there is one special thing to be aware of: if you use algebra to multiply or divide by a negative number, the relationship flips.
00:02:05.900 --> 00:02:11.300
For example, if we have -x + 1, we can subtract 1 on both sides, and we get -x < -1.
00:02:11.300 --> 00:02:16.000
At this point, we want to make our x positive, so we multiply both sides by -1.
00:02:16.000 --> 00:02:26.300
That causes our inequality symbol to flip to the other way; so we go from less than to greater than now.
00:02:26.300 --> 00:02:31.100
So, we now have x > 1; this is really important to remember.
00:02:31.100 --> 00:02:33.500
You don't want to forget about this when you are working with inequalities.
00:02:33.500 --> 00:02:37.100
Any time you multiply or divide by a negative number, it will cause
00:02:37.100 --> 00:02:43.000
your less than/greater than/less than or equal to/greater than or equal to/whatever you are dealing with...
00:02:43.000 --> 00:02:47.100
it will flip; your inequality symbol will flip to the other direction.
00:02:47.100 --> 00:02:52.000
It is really easy to miss this flip; it is a really easy mistake to make, so just be careful with this.
00:02:52.000 --> 00:02:58.600
Every time you are doing either multiplication or division, and it is a negative number that you are dealing with--
00:02:58.600 --> 00:03:03.700
negative anything that you are multiplying on both sides--you want to make sure you remember about this flipping thing.
00:03:03.700 --> 00:03:08.600
Notice that we can also get the same thing as we have here if we just added x to both sides.
00:03:08.600 --> 00:03:17.000
If we had had +x and +x, we would have had 1 < x, which is equivalent to saying x > 1.
00:03:17.000 --> 00:03:20.600
They are just the same statement, but two different ways of saying it.
00:03:20.600 --> 00:03:23.800
What causes this to happen--why do we see this negative flipping?
00:03:23.800 --> 00:03:27.800
You probably learned about it in algebra for a very long time, but you might not have a great understanding of it.
00:03:27.800 --> 00:03:32.900
So, let's actually get this: consider if we had some a and b, where a is less than b.
00:03:32.900 --> 00:03:39.100
On our number line, a would come before b; a would be closer to the 0 than b would be.
00:03:39.100 --> 00:03:42.900
So, what would it look like if we multiplied a and b by -1?
00:03:42.900 --> 00:03:52.000
Well, that would cause this mirroring around the 0; they would pop to the side opposite, depending on the distance that they originally were from the 0.
00:03:52.000 --> 00:03:58.200
So, -b and -a appear here; but notice that -b is now farther to the left than -a.
00:03:58.200 --> 00:04:02.100
Just as b was farther to the right, it is now going to be farther to the left.
00:04:02.100 --> 00:04:05.300
So, there is still a relationship, but now the relationship has flipped.
00:04:05.300 --> 00:04:12.100
Because b was more positive than a--b was originally more right than a--we know that -b has to be more negative,
00:04:12.100 --> 00:04:18.300
has to be more left, than -a; thus, we have this -a > -b,
00:04:18.300 --> 00:04:25.700
because originally a is less than b, but now -b is less than -a, so that causes our sign to effectively flip,
00:04:25.700 --> 00:04:33.700
because -b < -a is the same thing as saying -a > -b.
00:04:33.700 --> 00:04:36.400
Great; that is what is going on.
00:04:36.400 --> 00:04:44.000
You want to stick to basic operations; when you are working with inequalities, you want to try to keep using addition, subtraction, multiplication, and division.
00:04:44.000 --> 00:04:53.300
You can use more complicated algebra, like raising both sides to a power or taking a square root or taking a logarithm or taking some trigonometric function.
00:04:53.300 --> 00:04:55.900
But they can cause little problems to come up.
00:04:55.900 --> 00:05:01.700
Consider if you have x² > 0; now, that does not imply that x is greater than 0.
00:05:01.700 --> 00:05:05.900
We might think, "x² > 0, so I will take the square root of both sides."
00:05:05.900 --> 00:05:12.400
√x² > ±0...well, that is just 0, so we have x > 0, right?
00:05:12.400 --> 00:05:22.200
No, that is not true at all: over here, x = -3 is true--it checks out: (-3)² is greater than 0, because 9 is greater than 0.
00:05:22.200 --> 00:05:29.700
So, that is great; but -3 > 0--that is completely false; that is not a true statement.
00:05:29.700 --> 00:05:35.200
So, we do not have this ability to just toss out other, more complicated algebra things
00:05:35.200 --> 00:05:38.800
without really thinking about all of the implications that are going to happen here.
00:05:38.800 --> 00:05:44.200
So, this idea here doesn't work, because we are dealing with an inequality.
00:05:44.200 --> 00:05:50.300
We can't just take square roots, like we can when we are dealing with equations, which is how we built up all that previous theory.
00:05:50.300 --> 00:05:55.600
So, when you have an inequality, and you want to do something more than just a basic operation on both sides,
00:05:55.600 --> 00:05:59.500
you really have to be careful and think about what you are doing.
00:05:59.500 --> 00:06:02.800
That means that it is best to stick to basic arithmetic;
00:06:02.800 --> 00:06:06.900
so we really just want to stick with addition, subtraction, multiplication, and division,
00:06:06.900 --> 00:06:10.300
not because it is impossible to do this other stuff--not because you wouldn't get it--
00:06:10.300 --> 00:06:13.600
but just because it is easy to make a mistake doing it.
00:06:13.600 --> 00:06:18.000
You can end up making mistakes, because you haven't thought about absolutely all of the ramifications.
00:06:18.000 --> 00:06:21.000
So, you want to stick to the basic operations, because it is easy to see what happens.
00:06:21.000 --> 00:06:24.700
And remember: even with the basic operations, when we have multiplication and division,
00:06:24.700 --> 00:06:30.900
there is still a little bit of danger there, because when you do it with a negative number, it causes flipping of your inequality.
00:06:30.900 --> 00:06:35.300
So, with all of this in mind, it is really just best to stick to basic arithmetic.
00:06:35.300 --> 00:06:40.200
Happily, since we are only going to be working with linear inequalities, that means we can get through everything
00:06:40.200 --> 00:06:44.400
just using these basic operations--addition, subtraction, multiplication, and division.
00:06:44.400 --> 00:06:49.400
They are going to be enough to manipulate our linear inequalities into forms that make it easier for us to understand.
00:06:49.400 --> 00:06:55.100
All right, that finishes our refresher; now we are ready to actually talk about linear inequalities in two variables.
00:06:55.100 --> 00:07:00.500
A linear inequality in two (or more) variables tells us about a relationship between those variables.
00:07:00.500 --> 00:07:08.700
Consider -x + y ≥ 1: we can make it easier to interpret by just having y on one side and other stuff involving x on the other.
00:07:08.700 --> 00:07:15.100
So, we add x to both sides: + x, + x; and we get y ≥ x + 1.
00:07:15.100 --> 00:07:18.800
This gives us a relationship between x and y--how they are connected.
00:07:18.800 --> 00:07:24.600
If x is equal to 1, we know that y has to be greater than or equal to 2.
00:07:24.600 --> 00:07:30.700
If x is 1, then y has to be greater than or equal to 1 + 1, so y must be greater than or equal to 2.
00:07:30.700 --> 00:07:35.700
Similarly, if x were equal to -9, then that would mean that y is greater than or equal to -8.
00:07:35.700 --> 00:07:39.600
So, depending on what the x is, we will change the requirements on our y.
00:07:39.600 --> 00:07:44.100
It is a relationship: it is not this definite single static defined thing.
00:07:44.100 --> 00:07:49.700
It is this relationship of "as x shifts, y has to shift in certain ways to accommodate the shifting x."
00:07:49.700 --> 00:08:02.400
Now, notice: unlike a linear equality, where a single x would give us just a single y, a single x in an inequality gives infinitely many possible y's.
00:08:02.400 --> 00:08:12.700
x = 1 means y is greater than or equal to 2; so x = 1 means that y = 2 is good; y = 5 is good; y = 47 is good; y = 1 billion is good.
00:08:12.700 --> 00:08:17.400
We have this stack as possibilities, as long as they follow that inequality relationship.
00:08:17.400 --> 00:08:24.900
If x equals 1, y still can't be equal to -3; so it is not that anything goes--it just has to follow this inequality relationship.
00:08:24.900 --> 00:08:29.400
But if it does, there is an infinite variety of things that it could end up being.
00:08:29.400 --> 00:08:32.100
The best way to understand inequalities is by graphing them.
00:08:32.100 --> 00:08:35.200
This gives us a visual reference to see all of the possible solutions.
00:08:35.200 --> 00:08:41.600
So, for example, if we had y ≥ x + 1, we could graph it like this.
00:08:41.600 --> 00:08:50.100
Because it is a greater than or equal to, everything on our actual line is allowed as a solution,
00:08:50.100 --> 00:08:54.200
because y = x + 1 is going to be true by "greater than or equal."
00:08:54.200 --> 00:08:58.600
That "or equal" means that we can have equality; the line itself will be true.
00:08:58.600 --> 00:09:04.100
But then, in addition to that, everything above the line is also going to be true.
00:09:04.100 --> 00:09:10.200
Everything in here is going to end up being true; and you should notice that it doesn't just stop at the edge there.
00:09:10.200 --> 00:09:13.300
Once again, it is like how we don't draw arrows to show that it keeps going.
00:09:13.300 --> 00:09:17.500
We have gotten used to assuming that the graph keeps going beyond the edges of our graphing window.
00:09:17.500 --> 00:09:26.400
We are going to also be assuming that our shading goes past the edges; it doesn't stop suddenly--it goes forever, infinitely, up.
00:09:26.400 --> 00:09:34.400
So, everything above the line is a solution, because if y is greater than or equal to x + 1, then consider at x = 0:
00:09:34.400 --> 00:09:37.400
then 1 is true for y, but so would 2 be true for y...
00:09:37.400 --> 00:09:40.000
Let's use a different color, just so we can see this a little bit easier.
00:09:40.000 --> 00:09:47.000
2 would be true for y; 3 would be true for y; 4 would be true for y; 5 would be true for y; 6 would be true for y; and anything above that.
00:09:47.000 --> 00:09:56.700
So, as long as we are above this line with our y-value for a given x-value, we will end up being true; the y > x + 1 is true.
00:09:56.700 --> 00:10:02.500
So, a graph is a really great way to get across all of these possibilities, because it is not just this single line.
00:10:02.500 --> 00:10:09.600
It is certainly not just a single point; it is this huge variety--it is this large area of possibilities.
00:10:09.600 --> 00:10:15.200
This brings up a question: what does the line become if the inequality is strict--less than or greater than--
00:10:15.200 --> 00:10:19.600
as opposed to not strict, which is less than or equal to, or greater than or equal to?
00:10:19.600 --> 00:10:27.800
So, if we have a strict inequality, less than or greater than (it is purely less than, or it is purely greater than),
00:10:27.800 --> 00:10:31.100
we show this by changing how we draw the line on the graph.
00:10:31.100 --> 00:10:39.500
So, if it is a strict graph, like y > x + 1, we show that it is strict by using a dashed line.
00:10:39.500 --> 00:10:44.500
It is a little bit hard to see here; but notice that the line is actually dashed, like this.
00:10:44.500 --> 00:10:53.200
So, that says that we are saying that we are not including the line; we are only including the stuff above the line; the line itself is not allowed.
00:10:53.200 --> 00:11:00.800
On the flip side, if it is a not-strict inequality, like greater than or equal to, we show it by using a solid line,
00:11:00.800 --> 00:11:05.500
saying that the line itself is actually going to be an answer, as well.
00:11:05.500 --> 00:11:11.100
If you are on the line, that is an allowed answer, in addition to all of the stuff that is above it.
00:11:11.100 --> 00:11:24.600
So, we show that the points on the line are not solutions to our inequality with a dashed line, when it is a strict inequality.
00:11:24.600 --> 00:11:32.100
We show that they are solutions with a solid line when it is a not-strict inequality.
00:11:32.100 --> 00:11:33.900
And then, we just shade the appropriate side.
00:11:33.900 --> 00:11:41.700
In both of these cases, we have greater than and greater than or equal to; so they both had the part that was above it.
00:11:41.700 --> 00:11:47.200
Now, we don't necessarily have a very great way to see how to shade which way.
00:11:47.200 --> 00:11:50.200
You will get a sense of if it is up, or if it is down, as you work with these more.
00:11:50.200 --> 00:11:53.400
You can pay attention to what the y is, and if it is less than or greater than.
00:11:53.400 --> 00:11:59.500
But a really great way to be sure of which side to shade is by using a test point.
00:11:59.500 --> 00:12:03.400
You can shade by seeing how this test point gets affected.
00:12:03.400 --> 00:12:08.900
Would this test point satisfy our inequality, or would it fail to satisfy it?
00:12:08.900 --> 00:12:14.900
If the point satisfies the inequality (you just choose some point--it is completely your choice--
00:12:14.900 --> 00:12:18.900
you choose some point, and if it satisfies that inequality), then the whole side does,
00:12:18.900 --> 00:12:21.100
because we have to shade in an entire side.
00:12:21.100 --> 00:12:25.600
So, if one point on one side satisfies, that entire side has to satisfy.
00:12:25.600 --> 00:12:34.900
On the flip, if the point does not satisfy the inequality, then the other side will satisfy the inequality.
00:12:34.900 --> 00:12:39.600
So, if your point fails to satisfy, the opposite side will satisfy it.
00:12:39.600 --> 00:12:51.500
This makes it easy for us to shade: for example, if we have y < -5/2x + 3, we could try the test point (0,0).
00:12:51.500 --> 00:12:57.400
(0,0) is almost always a great test point, because you can plug in 0's really, really easily.
00:12:57.400 --> 00:13:03.000
Let's see: would that end up working out, if we have y < -5/2x + 3?
00:13:03.000 --> 00:13:11.800
We plug in 0 for y; we plug in 0 for our x; plus 3...so we have...is 0 less than 3?
00:13:11.800 --> 00:13:14.900
Sure enough, that checks out; so our test point is good.
00:13:14.900 --> 00:13:27.900
If our test point is good, that means that the entire side must be good; so we just shade this side to say anything below that line is going to be true.
00:13:27.900 --> 00:13:30.300
And notice: how did we get this line in the first place?
00:13:30.300 --> 00:13:37.300
We just take our inequality; we turn it into a line, as if it had been an equation, y = -5/2x + 3;
00:13:37.300 --> 00:13:40.900
and then, we graph that, because we know that that is going to be our line of demarcation.
00:13:40.900 --> 00:13:43.800
It is going to be the place where the shading changes over.
00:13:43.800 --> 00:13:49.900
And then, it gets dashed, because it is a strict inequality; so that is why we have that dashed line.
00:13:49.900 --> 00:13:53.800
And then, we shade off of that line that we drew.
00:13:53.800 --> 00:13:58.100
Alternatively, we could have tested a different point, like, let's say, (4,4).
00:13:58.100 --> 00:14:07.700
Maybe we had wanted to test (4,4); well, if we had tested that, it would be 4 for our y, less than -5/2 times 4, plus 3.
00:14:07.700 --> 00:14:25.300
So, 4 < -5/2(4)...so that gets us -10...+ 3; so is 4 less than -7?
00:14:25.300 --> 00:14:32.800
No, that fails to be true; so this side cannot be the side that get shaded in; that side is not going to end up being true.
00:14:32.800 --> 00:14:35.000
But really, I recommend using the point (0,0).
00:14:35.000 --> 00:14:41.200
You could use any point; you could use (1,0), (-5,3)...whatever point is useful for your specific case.
00:14:41.200 --> 00:14:45.900
But (0,0) is almost always going to be something...you want to choose something that is definitely on one side or the other.
00:14:45.900 --> 00:14:48.100
You don't want to choose something on the line itself.
00:14:48.100 --> 00:14:53.200
But (0,0), as long as it is not on one of your lines, is going to be a really good test point for using.
00:14:53.200 --> 00:14:57.900
All right, if you are graphing a system of inequalities, you do it in the same way.
00:14:57.900 --> 00:15:04.300
You graph each of the lines as if they were equalities; and you use either a dashed line
00:15:04.300 --> 00:15:12.100
(if it is a strict inequality, less than or greater than); and you use a solid line if it is a not-strict inequality
00:15:12.100 --> 00:15:17.000
(less than or equal, or greater than or equal); and then you shade in each inequality appropriately.
00:15:17.000 --> 00:15:21.000
And wherever the shadings overlap is the set of solutions to the system.
00:15:21.000 --> 00:15:22.500
So, let's see how that would work out here.
00:15:22.500 --> 00:15:30.100
For this one, y < 2/3x - 2, that is our red dashed line--dashed because it is a less than.
00:15:30.100 --> 00:15:45.300
So, let's try the test point (0,0) for that: (0,0)...we plug that in; we have 0 < 2/3(0) - 2.
00:15:45.300 --> 00:15:54.700
So, 0 < -2 is not true; 0 is greater than -2; so this fails.
00:15:54.700 --> 00:16:01.300
So, that means that the side opposite our test point is going to have to be what we shade in for the red one.
00:16:01.300 --> 00:16:05.700
Our test point was in the very center, in the origin; so we are going to be opposite that side.
00:16:05.700 --> 00:16:19.200
So, this is going to be what we shade in for the red line: y < 2/3x - 2 is true for everything in the shading, but not on the dashed line itself.
00:16:19.200 --> 00:16:25.600
Then, if we have y ≥ -2x + 1, let's use that same test point; it is not on that line, either.
00:16:25.600 --> 00:16:38.600
So, (0,0): 0 ≥ -2(0) + 1; so 0 ≥ 1; is that true?
00:16:38.600 --> 00:16:46.600
No, 0 is not greater than or equal to 1; so that fails here, as well; 0 is not greater than 1.
00:16:46.600 --> 00:16:53.000
That fails; so by the same logic, we are going to have to be opposite that side, greater than or equal;
00:16:53.000 --> 00:16:59.400
so we are going to be above it; so we shade in the side that is opposite.
00:16:59.400 --> 00:17:03.400
Also, you can think of this as being that y is greater, so it must be above the line;
00:17:03.400 --> 00:17:05.900
and the red one was "y is less than," so it must be below it.
00:17:05.900 --> 00:17:08.700
But the test points are a nice way to be absolutely sure of it.
00:17:08.700 --> 00:17:13.800
And notice how we have overlapping; we have red and blue overlapping in this bottom-right portion.
00:17:13.800 --> 00:17:23.400
So, that means the part that really, truly makes up the answers is everything in here.
00:17:23.400 --> 00:17:27.100
And that is going to keep going out forever, as long as it is in there.
00:17:27.100 --> 00:17:32.100
Everything on the blue line actually would be an answer, but things on the red dashed line...
00:17:32.100 --> 00:17:43.800
The blue solid line here is going to be answers; but the red dashed line here, since it is dashed, fails to be answers,
00:17:43.800 --> 00:17:50.000
because it doesn't satisfy our inequality y < 2/3x - 2, because that is strict.
00:17:50.000 --> 00:17:56.900
So, if it is on the blue line in that shaded portion, it is an answer; if it is on the dashed red line, it is not an answer.
00:17:56.900 --> 00:18:06.200
And there we are--we can see how the system comes together; we can see all of the solutions to it at once.
00:18:06.200 --> 00:18:08.900
All right, now: solutions are best found through graphing.
00:18:08.900 --> 00:18:15.100
Graphing is usually the best way to understand the solutions to a system of linear inequalities, as long as it is in two dimensions.
00:18:15.100 --> 00:18:17.900
For dealing with really high numbers of dimensions, it gets kind of hard to graph.
00:18:17.900 --> 00:18:21.600
But if we are in two dimensions, it is a good way to understand what is going on.
00:18:21.600 --> 00:18:24.900
It gives us a way to visually comprehend what we are seeing.
00:18:24.900 --> 00:18:30.100
It lets us see all of the requirements that the system places on the variables.
00:18:30.100 --> 00:18:36.100
So, this system of inequalities makes certain requirements of our variables.
00:18:36.100 --> 00:18:39.200
And by graphing it, we are able to see all of the requirements at the same time.
00:18:39.200 --> 00:18:46.100
Now, with a linear equality--if we had a linear equality (an equals sign between the left and right side),
00:18:46.100 --> 00:18:50.700
we could use substitution or elimination, because we were solving for a single answer.
00:18:50.700 --> 00:18:54.700
A linear equality is solving for one answer.
00:18:54.700 --> 00:19:05.300
But with a system of inequalities, we aren't going to get just one answer; we are going to have infinitely many answers, because we have shadings.
00:19:05.300 --> 00:19:10.100
As long as we have overlapping shadings for our system, that entire area of overlap,
00:19:10.100 --> 00:19:14.700
where all of our inequalities overlap together--that is going to be all of our answers.
00:19:14.700 --> 00:19:18.300
And because it is an area, there are infinitely many things inside of that area.
00:19:18.300 --> 00:19:23.600
Now, it is possible for us to have no answers whatsoever, if the shadings don't overlap--
00:19:23.600 --> 00:19:27.800
if one side shades up, and the other side shades down, and they never touch each other.
00:19:27.800 --> 00:19:32.000
That is never going to have any answers, because the two can never agree; they are inconsistent.
00:19:32.000 --> 00:19:38.500
But as long as they end up agreeing in some portion--some amount of area, inside of that area we will have infinitely many answers.
00:19:38.500 --> 00:19:43.600
So, when working with a system of inequalities, you will almost always want to graph,
00:19:43.600 --> 00:19:48.300
because you can graph it and then shade in the solutions, and you are able to see what is going on,
00:19:48.300 --> 00:19:53.500
and get an intuitive, visual sense of how this thing is coming together.
00:19:53.500 --> 00:20:01.400
All right, now we are able to talk about linear programming: an excellent application of linear inequalities is **linear programming**.
00:20:01.400 --> 00:20:05.200
It is not quite like computer programming; but it helps us optimize...
00:20:05.200 --> 00:20:08.400
It is actually quite different than computer programming; but in any case,
00:20:08.400 --> 00:20:13.800
it helps us optimize systems and make the best choice, given certain requirements.
00:20:13.800 --> 00:20:18.300
What does it mean to optimize? Well, we start with a linear objective function.
00:20:18.300 --> 00:20:23.900
We have something that is our objective, something that is sort of looking at the variables that we are dealing with.
00:20:23.900 --> 00:20:28.900
And we are trying to either maximize the objective function, or we are trying to minimize the objective function.
00:20:28.900 --> 00:20:37.000
So, we might want to try to maximize something like profit; or we might want to try to minimize something like cost.
00:20:37.000 --> 00:20:41.300
These are useful things; business is something where linear programming will definitely pop up.
00:20:41.300 --> 00:20:47.000
For example, we could have an objective function like z = 2x + 7y.
00:20:47.000 --> 00:20:52.500
So, if we have z = 2x + 7y, it uses x; it uses y; it is an objective function.
00:20:52.500 --> 00:21:03.000
We get some number out of 2x + 7y; we want to try to maximize or minimize this quantity, z.
00:21:03.000 --> 00:21:13.000
Now, notice: if there are no restrictions on x and y, z will be at its biggest when x is flying out to infinity and y is flying out to infinity.
00:21:13.000 --> 00:21:17.100
It will be minimized when x is flying to negative infinity and y is flying to negative infinity.
00:21:17.100 --> 00:21:25.000
So, we need to have some limitations on what x and y are going to be for us to actually be able to find any maximum or minimum, for that to be meaningful.
00:21:25.000 --> 00:21:28.700
And indeed, when you are working with linear programming, the variables in the objective function,
00:21:28.700 --> 00:21:35.500
these variables x and y, are going to have various constraints on them--things that keep them from being able to go anywhere.
00:21:35.500 --> 00:21:40.000
And those constraints will be given as a system of linear inequalities.
00:21:40.000 --> 00:21:43.900
So, we might have constraints like x + 3y must be less than or equal to 8,
00:21:43.900 --> 00:21:49.600
2x + y must be less than or equal to -4, and -x + 2y must be greater than or equal to -3.
00:21:49.600 --> 00:21:55.300
So, our objective will be to find the maximum or minimum of our objective function
00:21:55.300 --> 00:22:01.200
(remember: our objective function, in this case, was our z = 2x + 7y) while we are obeying these constraints.
00:22:01.200 --> 00:22:05.100
We can't break these constraints; so we have to stick within these constraints,
00:22:05.100 --> 00:22:10.700
but we are trying to get z to be the biggest or the smallest thing we possibly can get out of it.
00:22:10.700 --> 00:22:17.100
So, once we know what our objective function is (z in the previous slide), the first step is to graph the system of linear inequalities.
00:22:17.100 --> 00:22:20.200
To do that, we probably want to put them in a form that we can easily graph.
00:22:20.200 --> 00:22:31.400
So, x + 3y ≤ 8--we can convert that into y ≤ -1/3x + 8/3: we subtract x and divide by 3.
00:22:31.400 --> 00:22:37.900
We can convert 2x + y ≤ -4 into -2x - 4 by subtracting 2x.
00:22:37.900 --> 00:22:46.300
And -x + 2y ≥ -3--we add x to both sides and divide by 2; so we have things that are easy for us to graph.
00:22:46.300 --> 00:22:50.000
We have slope; we have the y-intercept at this point; so we can graph these.
00:22:50.000 --> 00:22:55.500
We graph these, and we get this; and we also shade in, and according to our shading,
00:22:55.500 --> 00:23:01.000
we find out that what is inside of there is going to be what is allowed by these constraints.
00:23:01.000 --> 00:23:08.100
So, the shaded area is the location of all feasible solutions--and by feasible, we mean those that are allowed by the constraints,
00:23:08.100 --> 00:23:12.300
those that are possible things that we can even begin to consider using.
00:23:12.300 --> 00:23:19.500
So, the location of our optimum value, whether it is a maximum or a minimum, must be inside of this portion.
00:23:19.500 --> 00:23:25.500
It has to be inside of this shaded thing or on the lines, because these were all less than or equal or greater than or equal.
00:23:25.500 --> 00:23:28.200
They are all not strict, so we can be on the lines, as well.
00:23:28.200 --> 00:23:33.000
So, since we can be on the lines, it has to be somewhere either on the lines or inside of that shaded portion.
00:23:33.000 --> 00:23:41.600
We know that for sure; otherwise, it won't have followed the constraint, so we can't even look at it for trying to use our objective function.
00:23:41.600 --> 00:23:46.900
Here is the critical idea: the theory of linear programming tells us that, if the solution exists--
00:23:46.900 --> 00:23:53.800
if there is some optimum maximum or minimum--if we can maximize or minimize our objective function--
00:23:53.800 --> 00:24:01.200
if that exists, then it occurs at a vertex of the set of feasible solutions.
00:24:01.200 --> 00:24:10.700
Now, a **vertex** of the set is one of the corners of the set, where two or more of them intersect.
00:24:10.700 --> 00:24:15.400
That is going to be one of the vertices; a vertex occurs at a corner.
00:24:15.400 --> 00:24:19.200
Now, we can find the locations of the vertices by solving for intersection points.
00:24:19.200 --> 00:24:25.800
We can see where the red line intersects the blue line, where the green line intersects the blue line, or where the green line intersects the red line.
00:24:25.800 --> 00:24:31.800
We are just using what we learned from systems of linear equations to be able to figure out where two lines intersect each other.
00:24:31.800 --> 00:24:35.400
We can figure out where these vertices are located.
00:24:35.400 --> 00:24:39.800
Once we know all of the vertices, we just try each of them in our objective function.
00:24:39.800 --> 00:24:43.100
We can figure out each of these vertices from what we learned in the previous lesson.
00:24:43.100 --> 00:24:46.200
We can understand what is going on from what we have seen in this lesson.
00:24:46.200 --> 00:24:49.300
And then, from there, we just plug them into our objective function;
00:24:49.300 --> 00:24:54.200
and whichever ends up coming out to be highest or lowest ends up being our maximum or our minimum.
00:24:54.200 --> 00:24:58.300
We will see this process done in Example 3 and in Example 4.
00:24:58.300 --> 00:25:01.000
All right, we are ready for some examples.
00:25:01.000 --> 00:25:05.200
The first one: Give the system of linear inequalities that produces the below graph.
00:25:05.200 --> 00:25:09.200
So, the first thing: let's figure out what are the lines that we are seeing drawn here.
00:25:09.200 --> 00:25:15.900
Before we even worry about dashed...is it greater than? Is it less than? Is it less than or equal to? Is it greater than or equal to?...
00:25:15.900 --> 00:25:21.300
before we even worry about that, let's just figure out what equation could draw each of these lines.
00:25:21.300 --> 00:25:27.000
For our red one right here, we see that it is a horizontal line; it is at y height of -2.
00:25:27.000 --> 00:25:32.500
So, that would be made up by y = -2; that equation would draw that line.
00:25:32.500 --> 00:25:37.900
Of course, it is not going to be a less than or equal or a greater than or equal, because it was dashed.
00:25:37.900 --> 00:25:43.300
But we know that that line would be drawn by y = -2; we will come back to figuring out what it is later.
00:25:43.300 --> 00:25:51.100
Our green one is going to be set at a horizontal location of 4; it has no slope whatsoever (it is vertical).
00:25:51.100 --> 00:25:59.600
So, that is going to be x = 4; we have set our horizontal location at 4, and our y is allowed to freely roam up and down.
00:25:59.600 --> 00:26:08.300
Finally, the only one that might even be slightly difficult is this blue dashed line, which goes from (0,4) to (2,0).
00:26:08.300 --> 00:26:12.000
If that is the case, we can figure out what the slope of our blue one is.
00:26:12.000 --> 00:26:19.700
It manages to go down four; it has a vertical change of -4 over a horizontal change of +2.
00:26:19.700 --> 00:26:23.300
It goes from a height of 4 to a height of 0 by going 2 steps to the right.
00:26:23.300 --> 00:26:29.500
That means it has a slope of -2; we also see that its y-intercept is right here at 4.
00:26:29.500 --> 00:26:37.600
So, its y-intercept is 4, so we have y = -2x + 4.
00:26:37.600 --> 00:26:41.200
At this point, we have equations that would produce each of these lines.
00:26:41.200 --> 00:26:47.000
So now, it is a question of what symbol goes in there; we can't use equals, because that would be an actual line.
00:26:47.000 --> 00:26:56.300
We need inequalities; so now it is a question of less than, greater than, less than or equal to, or greater than or equal to, or each of these.
00:26:56.300 --> 00:27:01.900
All right, we are going to swap out that equals sign for something that can actually be used as an inequality.
00:27:01.900 --> 00:27:08.100
So, the first step: the red has to shade above, because we have stuff above it,
00:27:08.100 --> 00:27:13.200
because if we go below it, that fails to be true; so it must be above it.
00:27:13.200 --> 00:27:24.700
That means that y has to be strictly greater than (because it is a dashed line) -2.
00:27:24.700 --> 00:27:28.200
If we want to be absolutely sure about this, we can try the test point (0,0).
00:27:28.200 --> 00:27:34.800
If we plug in 0 > -2, that works out; so we know that that side is correct; that is the side that we want.
00:27:34.800 --> 00:27:38.700
For the green one, we see that it is one the left side of that.
00:27:38.700 --> 00:27:45.600
So, if it is on the left side, we know that the horizontal values that we are allowed to use must be less than 4.
00:27:45.600 --> 00:27:52.900
Is it less than, or less than or equal to? It is less than or equal to, because it is a solid line: less than or equal to 4.
00:27:52.900 --> 00:27:59.000
We can also check out a test point: if we plug in (0,0), then we have 0 ≤ 4; yes, that is true.
00:27:59.000 --> 00:28:01.300
So, we know that that is correct for that shading.
00:28:01.300 --> 00:28:07.900
And then finally, our blue one: for this one, we know that it is shading up.
00:28:07.900 --> 00:28:13.200
So, if it is shading up, then it must be that our y-values are greater than
00:28:13.200 --> 00:28:22.600
(and it is going to be strictly greater, because it was a dashed blue line) -2x + 4.
00:28:22.600 --> 00:28:27.200
If we want to check that with a test point, we could try a test point, just like we did with the others.
00:28:27.200 --> 00:28:30.700
This one is a little bit harder to do in our head, since it involves more things.
00:28:30.700 --> 00:28:42.800
0 is greater than -2(0) + 4; 0 > 4; that test point fails, so indeed, it has to be shaded on this side--we chose the correct one.
00:28:42.800 --> 00:28:45.500
I'm sorry; I didn't mean to make that look like a greater than or equal to.
00:28:45.500 --> 00:28:56.800
We chose the correct symbol: y > -2x + 4, so in total, these are the inequalities that make that system be graphed like that.
00:28:56.800 --> 00:29:01.400
Great; the second example: Graph the solutions to the system below.
00:29:01.400 --> 00:29:06.700
The first thing we want to do--we probably want to convert this into a form where we can easily graph these.
00:29:06.700 --> 00:29:11.400
Divide by -3; since we are dividing by a negative number, the sign flips.
00:29:11.400 --> 00:29:26.200
We have y ≤ -2; next, 3x + y < 3, so y < ...subtracting 3x...-3x...+3...we don't have to worry about flipping, because it is addition or subtraction.
00:29:26.200 --> 00:29:43.800
And then finally, 6x - 4y...-4y < -6x - 4; divide by -4: y...it flips because we divided by a negative number, so -6/-4 becomes +3/2x; -4/-4 becomes positive 1.
00:29:43.800 --> 00:29:55.100
At this point, we have enough for us to graph this thing; so let's draw some axes in.
00:29:55.100 --> 00:30:17.800
We will make a tick-mark spacing; it is just a length of 1, so 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5.
00:30:17.800 --> 00:30:21.300
Great; at this point, we can draw each one of these in.
00:30:21.300 --> 00:30:25.800
We will draw them in as lines first; and then, from there, we will figure out how to shade.
00:30:25.800 --> 00:30:32.400
y ≤ -2; we use a solid line, because it is less than or equal, so it is not strict.
00:30:32.400 --> 00:30:42.000
At height -2, we are going to have a line, because we said y ≤ 2; so we graph in the line as if it was y = -2.
00:30:42.000 --> 00:30:47.100
We have just set a vertical height of -2, and our x is allowed to freely roam.
00:30:47.100 --> 00:30:52.900
Next, the red one: y < -3x + 3, so our first point is at the y-intercept of 3.
00:30:52.900 --> 00:31:04.800
If we go over one step, we will have our slope of -3 kick in; we will go down 3, so we can draw this one in.
00:31:04.800 --> 00:31:19.200
All right; oops, I should have had that be dashed, because it was a less than, so it is strict; I will dash that with the eraser.
00:31:19.200 --> 00:31:21.900
And then finally, our green one: I won't forget to dash this one.
00:31:21.900 --> 00:31:34.200
3/2x + 1; so we have a y-intercept at 1; if we go over 2, we go up 3, because our slope is 3/2: over 2, up 3; 1, 2, 3.
00:31:34.200 --> 00:31:49.200
We draw this one in; all right, and now let's figure out our shading.
00:31:49.200 --> 00:32:05.600
y ≤ -2; well, if it is less than or equal to -2, we have to have shading below that; so we shade below that here,
00:32:05.600 --> 00:32:12.700
because we can use a test point, like (0,0), but we also see that y has to be below -2; otherwise that is going to not be true.
00:32:12.700 --> 00:32:14.200
So, we shade in below that.
00:32:14.200 --> 00:32:20.500
For our red one, y has to be less than -3x + 3; once again, the y's will have to be below this value.
00:32:20.500 --> 00:32:30.200
We can use a test point, like (0,0); if we plug that in, we will have 0 < -3(0) + 3, which means 0 < +3, which is, indeed, true.
00:32:30.200 --> 00:32:36.600
So, we shade towards that test point of (0,0).
00:32:36.600 --> 00:32:54.900
And then finally, we have a green one: y > 3/2 + x; 3/2 + x is going to get us this one here.
00:32:54.900 --> 00:33:07.600
So, that is going to cause us to shade up; if we plug in a test point of (0,0), we have 0 > 3/2 times 0, which means 0 > 1.
00:33:07.600 --> 00:33:17.300
Oops, if 0 is greater than 1...that would fail to be true, so we are shading the opposite way; we are shading away from our original test point.
00:33:17.300 --> 00:33:21.000
Our original test point was (0,0), so we are shading in the opposite direction of that.
00:33:21.000 --> 00:33:25.000
Let's extend our red so we can see a little bit better where we are going.
00:33:25.000 --> 00:33:32.800
At this point, we see that the only place that ends up having green, red, and blue together is this section over here.
00:33:32.800 --> 00:33:45.200
Here (where I am shading in with a zigzag purple)--this section over here, and continuing out in that arc, will end up being the answers to our solution.
00:33:45.200 --> 00:33:48.100
We see the solution graphed in that way.
00:33:48.100 --> 00:33:57.200
All right, the third example: Find the maximum and minimum values of the objective function z = 2x + 7, given the below constraints.
00:33:57.200 --> 00:34:05.000
The first thing we do is change them into a form so we can easily graph them and have a better understanding of what is going on.
00:34:05.000 --> 00:34:08.300
Just like we had before, this is the same example that we were working with
00:34:08.300 --> 00:34:13.700
when we were talking about the idea of linear programming, maximizing and minimizing objective functions.
00:34:13.700 --> 00:34:27.200
So, this is the same one that we had before: y ≤ -1/3x + 8/3; 2x + y becomes y ≤ -2x - 4;
00:34:27.200 --> 00:34:42.300
and then, we have y ≥ -1/2x...sorry, not -1/2; it gets canceled out as it adds over, so +1/2x - 3/2; great.
00:34:42.300 --> 00:34:45.200
So, let's just give a rough sketch, so we can see what is going on.
00:34:45.200 --> 00:34:47.600
We don't have to worry about having this perfectly precise.
00:34:47.600 --> 00:34:52.800
The idea is just to be able to see this, because unlike graphing the solutions to an inequality,
00:34:52.800 --> 00:34:56.400
where we never really figure out the thing, so we want to have a solid graph; in this case,
00:34:56.400 --> 00:35:01.400
the graph is just a reference, so we can have a better understanding of how the solving is working.
00:35:01.400 --> 00:35:09.000
So, -1/3x + 8/3; I will start at around some height of about 3.
00:35:09.000 --> 00:35:15.800
And so, let's actually put in marks, so we have some rough sense of where we are going here.
00:35:15.800 --> 00:35:26.300
1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5; great.
00:35:26.300 --> 00:35:34.100
OK, the red one: positive 8/3, so we are almost at the 3; and then 1/3...it will slowly slope down to...
00:35:34.100 --> 00:35:39.900
by the time it gets here, it will be about here; you could drop down...and it is going to be a solid line,
00:35:39.900 --> 00:35:43.500
because it was less than or equal to; so it is like that.
00:35:43.500 --> 00:35:58.400
And then, y ≤ -2x - 4; at -4...and then, for every one it goes to the left, it will go up 2, 2, 2...
00:35:58.400 --> 00:36:01.900
Also, it is solid once again, because it was a less than or equal.
00:36:01.900 --> 00:36:09.700
And then, the final one is also going to be solid; it is less than or equal to 1/2x - 3/2, so halfway between the -1 and the -2.
00:36:09.700 --> 00:36:20.900
At 1/2x...so there...OK; it is not a perfect graph, but it gives us a rough idea of what we are looking for.
00:36:20.900 --> 00:36:27.600
We are looking for something that is going to be in this part, including the lines.
00:36:27.600 --> 00:36:32.100
Now, the theory of linear programming--what we learned about that--the critical idea--was that we know
00:36:32.100 --> 00:36:37.700
that the answer is going to be (if there is an answer at all) on one of these vertices.
00:36:37.700 --> 00:36:44.900
For the maximum and the minimum, each will show up as a vertex on this triangle (or whatever kind of picture we have).
00:36:44.900 --> 00:36:52.800
It is going to show up as a vertex on this image--one of the corners to our set of allowable points/feasible solutions.
00:36:52.800 --> 00:36:57.100
So, let's figure out what it is: let's do the red and the blue together first.
00:36:57.100 --> 00:37:04.200
If that is the case, we can treat this as y = -1/3x + 8/3, and y = -2x - 4,
00:37:04.200 --> 00:37:08.400
because for this, we are trying to figure out where the lines intersect, because we are looking for vertices.
00:37:08.400 --> 00:37:19.900
-1/3x + 8/3 = -2x - 4; where do our red line and our blue line intersect?
00:37:19.900 --> 00:37:22.400
Multiply everything by 3; at this point, I am just going to use blue.
00:37:22.400 --> 00:37:29.700
Multiply everything by 3 for ease: -x + 8 cancels out those fractions; -6x - 12...
00:37:29.700 --> 00:37:42.100
We add 12 to both sides; we get 20 over here; add x to both sides; we get -5x; divide by -5 on both sides; we get -4 = x.
00:37:42.100 --> 00:37:47.500
We can plug this into one of the two functions; let's go with the -2x - 4, because that will be easier.
00:37:47.500 --> 00:37:51.100
Once again, we can use it as an equality, because we are looking for a line intersection.
00:37:51.100 --> 00:37:56.900
We aren't worried about the inequality effect; we are worried about "as if it were a line," because we only care about the vertex right now.
00:37:56.900 --> 00:38:09.800
So, we can plug that in, and we will have that y = -2...plug in our x, -4; minus 4; y =...-2(-4) gives us + 8, minus 4; so y = 4.
00:38:09.800 --> 00:38:15.400
Great; so one of our vertices is (-4,4).
00:38:15.400 --> 00:38:19.600
Next, what if we had our red intersect our green?
00:38:19.600 --> 00:38:29.400
-1/3x + 8/3--if that was the line--would be equal to (because we are looking for the intersection) 1/2x - 3/2.
00:38:29.400 --> 00:38:35.900
So, where do those intersect? Let's multiply everything by 6, just so we can get rid of these fractions; I think that makes it easier to look at.
00:38:35.900 --> 00:38:41.700
So, multiply everything by 6; I will just choose red for the color I will use here.
00:38:41.700 --> 00:38:50.300
That gets us -2x plus...8/3 cancels out the 3 portion of the 6, which means it is going to be 2(8), 16.
00:38:50.300 --> 00:38:58.100
Now, we are multiplying by 6 still, so it is going to give us 3x, multiplying by 6, minus 9, because 3/2 times 6 becomes 9.
00:38:58.100 --> 00:39:01.700
At this point, we can solve this out: add 2x to both sides; add 9 to both sides.
00:39:01.700 --> 00:39:08.600
Adding 9 to both sides, we get 25 =...add 2x to both sides...5x/5; 5 = x.
00:39:08.600 --> 00:39:17.900
We can now plug this into either one of them; to me, the y = 1/2x - 3/2 looks ever so slightly friendlier, so I will plug into that one.
00:39:17.900 --> 00:39:35.100
So, y = 1/2x, this one right here, so y = 1/2(5) - 3/2; so 5/2 - 3/2 = 2/2, which equals 1.
00:39:35.100 --> 00:39:50.000
At this point, we have another vertex; 5 = x and y = 1; so that is going to occur where the red and green intersect over here, (5,1).
00:39:50.000 --> 00:39:55.700
And then finally, let's look at where the blue and the green would intersect, the one that we haven't looked at yet.
00:39:55.700 --> 00:40:03.700
-2x - 4 = 1/2x - 3/2; multiply everything...
00:40:03.700 --> 00:40:08.900
I'm sorry; let's change that into colors, just so we can keep our color scheme going.
00:40:08.900 --> 00:40:19.700
1/2x - 3/2...we will multiply everything by 2 to get rid of that fraction; so -4x - 8 = x - 3.
00:40:19.700 --> 00:40:24.100
Put our x's together; put our constants together; add 3 to both sides; we get -5.
00:40:24.100 --> 00:40:31.000
Add positive 4x to both sides; we get 5x; divide by 5 on both sides; we get -1 = x.
00:40:31.000 --> 00:40:47.500
We can now plug that into either one; this one, to me, looks friendlier, so y = -2(-1) - 4; y = +2 (because the negatives cancel out) - 4; y = -2.
00:40:47.500 --> 00:40:58.300
At this point, we have y = -2 and -1 = x; so a point here will be (-1,-2).
00:40:58.300 --> 00:41:03.700
We have found the three vertices to this; now, we need to go use that information.
00:41:03.700 --> 00:41:12.900
They are at (-4,4), (5,1), (-1,-2); so now, we want to evaluate them in our objective function, z = 2x + 7y,
00:41:12.900 --> 00:41:18.700
and figure out which one makes z biggest, which one makes z smallest, and which one is just somewhere in the middle.
00:41:18.700 --> 00:41:21.000
All right, so where are our maximum and minimum?
00:41:21.000 --> 00:41:34.500
Our vertices are (-4,4), (5,1), (-1,2); we have (-4,4) here, (5,1), and (-1,-2) here.
00:41:34.500 --> 00:41:43.600
All right, so let's start with (-4,4); we plug that in for z = 2x + 7y.
00:41:43.600 --> 00:41:45.900
So, what will our z end up coming out to be?
00:41:45.900 --> 00:41:56.800
2 times our x component is -4; plus 7 times our y component is positive 4, so that gets us -8, plus 7 times 4 (28), which equals 20.
00:41:56.800 --> 00:41:59.600
So, we get 20 out of (-4,4).
00:41:59.600 --> 00:42:07.200
Let's try our next one, (5,1): plug that in--we get z = 2 times our x component of 5,
00:42:07.200 --> 00:42:15.600
plus 7 times our y component of 1 which equals 10 + 7, so we get 17.
00:42:15.600 --> 00:42:32.000
And then, finally, we plug in our (-1,-2), and that gets us z = 2 times x component, -1, plus y component, 7(-2).
00:42:32.000 --> 00:42:38.600
So, we get -2 - 14, which is equal to -16.
00:42:38.600 --> 00:42:45.800
All right; at this point, we can see who is our winner for maximum; that is going to be z = 20, which occurred at (-4,4).
00:42:45.800 --> 00:42:51.600
So, (-4,4) is the maximum for our objective function.
00:42:51.600 --> 00:43:01.000
And (-1,-2) put out -16, so that was the minimum value that we ended up seeing.
00:43:01.000 --> 00:43:09.200
And (5,1) gave us +17, but that is neither a maximum nor a minimum, so we just forget about it.
00:43:09.200 --> 00:43:16.400
All right, the final example: A car lot needs to choose what cars to order for selling on their lot.
00:43:16.400 --> 00:43:26.200
They have two options: the Nice, which they purchase at 20000 and sell at 30000, and the Superfine, which they purchase at 50000 and sell at 65000.
00:43:26.200 --> 00:43:32.700
If they have a total budget of 2.9 million dollars for purchasing cars, and 100 spots on the lot for new cars,
00:43:32.700 --> 00:43:36.500
how many of each car should they buy to maximize profit?
00:43:36.500 --> 00:43:39.600
Assume that they manage to sell whatever they purchase.
00:43:39.600 --> 00:43:43.000
The idea here is that they purchase a car, and then they mark it up and sell it.
00:43:43.000 --> 00:43:46.200
And so, the difference between those two is how much money they make.
00:43:46.200 --> 00:43:53.400
But they have limits on how much money they start with for purchasing cars, and how many spots they have to actually put the cars on the lot.
00:43:53.400 --> 00:43:59.900
So, they have to figure out what is the best combination of cars to purchase, to be able to maximize how much money they make out of it.
00:43:59.900 --> 00:44:03.600
So, with all of this in mind, let's start setting some things up.
00:44:03.600 --> 00:44:07.500
First, we are going to have to figure out how many numbers of Nice they buy.
00:44:07.500 --> 00:44:15.100
Let's say N is going to be the symbol that we use for saying the number of Nice cars that they buy.
00:44:15.100 --> 00:44:19.200
The Nice cars that they buy will be N, however many that is.
00:44:19.200 --> 00:44:26.100
And then, the Superfines that they buy--S will symbolize the number of Superfines that they buy.
00:44:26.100 --> 00:44:37.800
OK, now another thing that we have here is a lot of really big numbers: 30000, 20000, 50000, 65000, 2.9 million dollars.
00:44:37.800 --> 00:44:41.500
Now, we could work with the numbers as they actually are, and everything would end up working out.
00:44:41.500 --> 00:44:45.900
But we would have this extra factor of 100 showing up; all of these things are divisible by 1000.
00:44:45.900 --> 00:44:49.800
So, I am going to say, "Why don't we make things a little bit easier on ourselves?"
00:44:49.800 --> 00:44:54.100
And since we are dealing with lots of money--we are dealing with all of these big things,
00:44:54.100 --> 00:44:58.900
measured in the thousands and tens of thousands, let's convert everything.
00:44:58.900 --> 00:45:08.600
For ease, let's work in terms of thousands of dollars; let's talk about everything in terms of how many K it is--
00:45:08.600 --> 00:45:13.400
how many thousand (K, kilo, thousand)--how many thousand dollars everything is.
00:45:13.400 --> 00:45:18.000
OK, that will make things a little bit easier, just in how many 0's we have to write down.
00:45:18.000 --> 00:45:23.700
So, next, let's figure out how much profit they make off of a single Nice,
00:45:23.700 --> 00:45:29.500
because what we want to do is maximize the profit; so we need to create some function p
00:45:29.500 --> 00:45:34.700
that is going to be p = the profit, so we need to come up with some equation that describes p
00:45:34.700 --> 00:45:40.400
in terms of how many Nice and how many Superfines they buy--how much N and S we have to go around--
00:45:40.400 --> 00:45:42.100
because we know for sure that they will sell all of them.
00:45:42.100 --> 00:45:47.600
So, how much profit do they make if they buy such a number of Nice and such a number of Superfines?
00:45:47.600 --> 00:45:53.300
First, we have to figure out how much profit they make off of selling a Nice and how much profit they make off of selling a Superfine.
00:45:53.300 --> 00:46:06.300
A Nice: if they buy a Nice, it costs them 20K, 20000; it costs them 20000, which is 20K in our new form.
00:46:06.300 --> 00:46:18.500
They can sell that for 30K, which would net them a profit of the amount that they sold it for, minus the amount that they had to buy it for.
00:46:18.500 --> 00:46:22.400
That would net them a profit of 10K.
00:46:22.400 --> 00:46:40.100
For the Superfines, they cost them 50K to buy; they sell them at 65K; so each one they sell is going to net them a profit of 15K.
00:46:40.100 --> 00:46:50.200
OK, with this in mind, let's write p in green for American money, since we are dealing with U.S. dollars here.
00:46:50.200 --> 00:47:02.400
p = 10 times N, the number of Nices that we sell, plus 15 times S, the number of Superfines that we sell,
00:47:02.400 --> 00:47:09.100
because remember: for each Nice we sell, we manage to make 10K; for each Superfine we sell, we manage to make 15K.
00:47:09.100 --> 00:47:16.500
So, the total profit is going to be 10N + 15S...K, but we don't have to worry about the K's now.
00:47:16.500 --> 00:47:22.400
We won't worry about it when we are actually dealing with the numbers--the fact that they have the unit of thousands of dollars.
00:47:22.400 --> 00:47:24.700
All right; but there are some restrictions here.
00:47:24.700 --> 00:47:32.200
We were told that there is a restriction of 2.9 million dollars for purchasing cars.
00:47:32.200 --> 00:47:35.500
They don't just have unlimited amounts of money to buy cars.
00:47:35.500 --> 00:47:40.200
If they had unlimited amounts of money, they would want to stock their entire car lot with nothing but Superfines.
00:47:40.200 --> 00:47:45.200
They would just want to fill the thing all up with Superfines; but they have a cost to these things.
00:47:45.200 --> 00:47:53.300
So, we have to deal with that; so if it is 2.9 million for purchasing cars, then...
00:47:53.300 --> 00:48:03.900
well, each Nice that we buy is going to be 20N; and each Superfine that we buy is going to cause us to spend 50S.
00:48:03.900 --> 00:48:07.100
So, 20N + 50S is how much we have spent on cars.
00:48:07.100 --> 00:48:14.700
Now, they can spend up to 2.9 million; so 20N + 50S has to be less than or equal to their total budget.
00:48:14.700 --> 00:48:24.400
And their total budget is 2.9 million, which we can write out as 2900, because 2.9 million is the same thing as 2900 thousand.
00:48:24.400 --> 00:48:28.100
So, since we divided everything by 1000, we are now dealing with 2900.
00:48:28.100 --> 00:48:34.100
All right, another piece of information that we had was that there are only 100 spots on the lot.
00:48:34.100 --> 00:48:38.400
There is a maximum number of spots that the can fit cars into.
00:48:38.400 --> 00:48:44.500
So, if that is the case--if they only have 100 spots to fit cars into--well then, the number of Nices that we are buying,
00:48:44.500 --> 00:48:48.800
plus the number of Superfines that we are buying, has to be less than or equal to 100,
00:48:48.800 --> 00:48:52.500
because they can only fit up to 100 of these cars on the lot.
00:48:52.500 --> 00:48:54.400
So, that is two requirements so far.
00:48:54.400 --> 00:49:01.700
Now, there are two hidden requirements that we might not see, but they will make it easier to actually graph the thing.
00:49:01.700 --> 00:49:07.100
Think about this: is it possible to have a negative number of Nices--can they buy negative cars?
00:49:07.100 --> 00:49:12.500
No, the lowest number of Nices that they can buy, or the lowest number of any car that they can buy, is 0.
00:49:12.500 --> 00:49:18.000
So, we know that however many Nices that they buy, it has to be greater than or equal to 0.
00:49:18.000 --> 00:49:21.000
And similarly, S must be greater than or equal to 0.
00:49:21.000 --> 00:49:27.900
We have four requirements on this: the amount of money that have to spend (20N + 50S has to be less than or equal to 2900);
00:49:27.900 --> 00:49:34.400
N + S has to be less than or equal to 100 (the number of spots on the lot); and the fact that they can't buy negative cars--
00:49:34.400 --> 00:49:37.500
N has to be greater than or equal to 0, and S has to be greater than or equal to 0.
00:49:37.500 --> 00:49:47.500
And our objective function that we are trying to maximize, because we are trying to maximize our profit, is this p = 10N + 15S.
00:49:47.500 --> 00:49:53.400
We want to maximize p; at this point, we bring to bear the power of linear programming.
00:49:53.400 --> 00:49:58.100
First, let's convert some of this stuff into things that we can easily graph.
00:49:58.100 --> 00:50:09.500
So, if we are going to graph this, so we can see what is going on, we have to choose something to be horizontal and something to be vertical.
00:50:09.500 --> 00:50:22.600
So, just arbitrarily, let's make N the horizontal and S the vertical; N gets to be horizontal; S is vertical.
00:50:22.600 --> 00:50:31.100
With this idea in mind, we can now talk about ordered pairs that come in the form (N,S), just as (x,y) is (horizontal,vertical).
00:50:31.100 --> 00:50:35.900
Since we made N horizontal and we made S vertical, it is going to come in (N,S).
00:50:35.900 --> 00:50:39.100
Now, there is no reason it couldn't be flipped; but we just chose one, and we stick to it.
00:50:39.100 --> 00:50:41.300
And as long as we stick to it, it will work out.
00:50:41.300 --> 00:50:47.600
OK, at this point, if that is the case, then since S is the vertical, we normally solve for y (the vertical) in terms of other stuff;
00:50:47.600 --> 00:50:51.600
so we want to solve for S (the vertical) in terms of other stuff, because that is what we are used to.
00:50:51.600 --> 00:50:57.800
N + S ≤ 100 means that S has to be less than or equal to -N + 100.
00:50:57.800 --> 00:51:08.100
20N + 50S ≤ 2900; 50S ≤ -20N + 2900.
00:51:08.100 --> 00:51:24.500
We divide both sides by 50; we have S ≤ -2/5N + 2900/50 (becomes...give me just a second...58; I had to use a calculator for that one).
00:51:24.500 --> 00:51:31.000
So, 2900/50 becomes 58; we have S ≤ -2/5N + 58.
00:51:31.000 --> 00:51:38.800
So, with this in mind, we have enough to be able to see what we are allowed to go for here.
00:51:38.800 --> 00:51:44.600
If N has to be greater than or equal to 0, then we have this graph...
00:51:44.600 --> 00:51:54.600
If N has to be greater than or equal to 0, this is actually going to be the green one; so for a second, forget about that mistake.
00:51:54.600 --> 00:51:58.700
N has to be greater than or equal to 0, so we set N equal to 0 and draw a line.
00:51:58.700 --> 00:52:06.400
S is allowed to go wherever it wants; everything on this side is fine by our N > 0.
00:52:06.400 --> 00:52:15.800
S has to be greater than or equal to 0: we set a line S = 0; everything greater than that is fine by S ≥ 0.
00:52:15.800 --> 00:52:20.800
Now, the interesting parts are actually going to end up being the S ≤ -N + 100...
00:52:20.800 --> 00:52:32.100
If that is the case, we can get a good sense of this; let's say 100 is up here; at -1, it marches down like this at a 45-degree angle.
00:52:32.100 --> 00:52:39.500
And we know that S has to be less than or equal to -N + 100, so it will be below this.
00:52:39.500 --> 00:52:52.600
And S ≤ -2/5N + 58; it is going to start at a y-intercept height of 58, but it goes much less steeply down at -2/5.
00:52:52.600 --> 00:52:57.400
So, it goes like that; and it also will allow for the part below it.
00:52:57.400 --> 00:53:04.600
So, the total set of things that is allowed is this highlighted part in yellow.
00:53:04.600 --> 00:53:16.900
However, the only things that are really going to be interesting are going to be our vertices--the vertex here, here, here, and here.
00:53:16.900 --> 00:53:20.000
We will circle those in yellow, just to make them a little bit more obvious.
00:53:20.000 --> 00:53:23.500
But it is probably becoming pretty hard to see through the loudness of those colors.
00:53:23.500 --> 00:53:25.000
We have an idea of those corners.
00:53:25.000 --> 00:53:29.600
Now, notice: (0,0) is one of the points--we have an origin corner.
00:53:29.600 --> 00:53:37.400
Is it possible to make any money if we plug that into p =...0 for N and 0 for S, if we buy no cars to sell?
00:53:37.400 --> 00:53:40.400
No, we can't make any money; so we only have three things to care about:
00:53:40.400 --> 00:53:47.100
where red intersects green, where red intersects blue, and where blue intersects purple.
00:53:47.100 --> 00:53:51.000
So, if that is the case, let's look at where red intersects green first.
00:53:51.000 --> 00:54:01.400
That is -2/5N + 58 gives us N ≥ 0.
00:54:01.400 --> 00:54:08.100
If that is the case, if it is N ≥ 0, that is a little bit difficult, because we are set up for solving for S.
00:54:08.100 --> 00:54:19.000
So, where is that going to intersect? Well, at N ≥ 0, we want to figure out what that comes out to be.
00:54:19.000 --> 00:54:29.000
If S is equal to -2/5 times 0 plus 58, if we know that this is going to be equal to S, and N is greater than or equal to 0,
00:54:29.000 --> 00:54:32.500
we can treat it as N = 0, because we are only dealing with lines here.
00:54:32.500 --> 00:54:44.900
So, we plug that in here; we have -2/5 times 0, plus 58, equals S; so 58 is S, and we have an N of 0.
00:54:44.900 --> 00:54:54.600
So, the point that we get out of this is going to be N = 0, 58 = S, so (0,58) is one of our points so far.
00:54:54.600 --> 00:54:59.200
Next, let's look at where the blue intersects the purple.
00:54:59.200 --> 00:55:11.600
-N + 100 =...the purple had a height of S = 0, no height at all, so that is just going to be 0, so 100 = N.
00:55:11.600 --> 00:55:21.300
That means we have (100,0), because if we were to plug that into N + S = 100,
00:55:21.300 --> 00:55:28.300
since we are dealing with the lines now--if we plugged in that, we would have 100 + S = 100; therefore, S = 0.
00:55:28.300 --> 00:55:34.200
So, we have (100,0); notice that these are the two extremes possible for the car lot to sell.
00:55:34.200 --> 00:55:42.300
It could sell all Superfines--it could sell nothing but Superfines--and it has a maximum amount of money that it can spend, 2.9 million.
00:55:42.300 --> 00:55:51.000
So, it can't buy its lot entirely full of Superfines; it could only have 58 Superfines on the lot before it would run out of money to purchase cars with.
00:55:51.000 --> 00:55:58.500
On the other hand, it could buy 100 of the Nices; and it would still have money left over, but it has run out of spots on the lot.
00:55:58.500 --> 00:56:03.400
So, it could buy 100 Nices and no Superfines, and have extra money left over;
00:56:03.400 --> 00:56:09.800
or the lot could buy all Superfines and run out of money before it runs out of spots.
00:56:09.800 --> 00:56:14.700
It would have 58 Superfines, but still, that gives us another 42 spots left for Nices.
00:56:14.700 --> 00:56:18.200
So, those are the two extremes possible, so far.
00:56:18.200 --> 00:56:25.200
Finally, we could also have the possibility of if we have the blue and the red intersect.
00:56:25.200 --> 00:56:42.400
If we had -N + 100 equal to -2/5N + 58, we can multiply everything by 5, just to make it a little bit easier on us.
00:56:42.400 --> 00:56:50.900
-5N + 500 = -2N + 58...we turn to a calculator to figure out what 58 times 5 is.
00:56:50.900 --> 00:57:02.900
We get 290 out of that; we add 5n to both sides; we subtract 290 on both sides.
00:57:02.900 --> 00:57:09.400
500 - 290 gets us 210; we add 5n to both sides; that gets us 3n.
00:57:09.400 --> 00:57:16.200
That gets us...dividing by 3...I'm sorry; not 80, but 70, equals N.
00:57:16.200 --> 00:57:19.900
We use that to figure out how many Superfines that would bring us.
00:57:19.900 --> 00:57:36.800
By our lot equation of S ≤ -N + 100, we want to be on the line (equals), so S = -N + 100; so S = -70 + 100, or S = 30.
00:57:36.800 --> 00:57:46.100
The three possibilities are (0,58), (100,0), and (70,30).
00:57:46.100 --> 00:57:53.500
At this point, we just want to actually plug each one of them in and figure out which of these works best.
00:57:53.500 --> 00:57:57.100
Let's start with the point that we have arbitrarily made the red point.
00:57:57.100 --> 00:58:10.100
If we sell nothing but Superfines--we spend all of our money on Superfines--then that is 10 times 0, plus 15 times 58, just so we keep up the same pattern.
00:58:10.100 --> 00:58:21.100
15 times 58 becomes 870; so we would make a total of 870 thousand dollars at the lot if we bought nothing but Superfines.
00:58:21.100 --> 00:58:32.300
Next, we will do the one that we arbitrarily made the blue point: the profit out of that one would be 10(100) + 15(0), the number of Superfines.
00:58:32.300 --> 00:58:36.300
So, the profit that we would make off the lot would be 1000 + 0.
00:58:36.300 --> 00:58:45.800
So, if we sold nothing but Nices, we would be able to get 1000 thousand, or 1 million, off of our sales.
00:58:45.800 --> 00:58:49.000
But what if we sold a combination of Nice and Superfine?
00:58:49.000 --> 00:59:01.500
If we sold a combination, the one we arbitrarily made the green point, then our profit would be 10(70) + 15(30).
00:59:01.500 --> 00:59:06.900
10 is the profit from the Nices; 15 is the profit from the Superfines; we are selling 70 Nices and 30 Superfines.
00:59:06.900 --> 00:59:10.200
We know that it is possible, because it is on our vertex.
00:59:10.200 --> 00:59:27.200
That gets us 700 + 15(30) is 300 + 150; 450; so this is a total profit of 1150 thousand from 70 and 30.
00:59:27.200 --> 00:59:41.800
So, the best, the optimum solution, for maximum profit, is to sell 70 Nices and 30 Superfines.
00:59:41.800 --> 00:59:47.800
And if you are curious, that came out to be a profit of 1150 thousand, so the total profit,
00:59:47.800 --> 00:59:56.600
the maximum possible profit for the lot, will end up being 1150 million dollars.
00:59:56.600 --> 00:59:59.700
All right, cool; that finishes for linear inequalities.
00:59:59.700 --> 01:00:05.300
There is this idea of linear programming, and there is also just being able to figure out what the things that our linear inequality allows for are.
01:00:05.300 --> 01:00:09.100
Linear programming is a great thing that we can use all of our information about linear inequalities for.
01:00:09.100 --> 01:00:10.900
But you can also just work with linear inequalities.
01:00:10.900 --> 01:00:13.000
All right, we will see you at Educator.com later--goodbye!