Main content

## Algebra 1

### Unit 10: Lesson 2

Piecewise functions- Introduction to piecewise functions
- Worked example: evaluating piecewise functions
- Evaluate piecewise functions
- Evaluate step functions
- Worked example: graphing piecewise functions
- Piecewise functions graphs
- Worked example: domain & range of step function
- Worked example: domain & range of piecewise linear functions
- Absolute value & piecewise functions: FAQ

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Worked example: domain & range of piecewise linear functions

CCSS.Math:

Finding the domain and range of a piecewise function where each segment is linear.

## Want to join the conversation?

- Hi do real numbers include negatives? Because I can see you mentioned in the X can be any real number.(21 votes)
- Yes, real numbers include negative numbers. Real numbers are complex numbers whose imaginary component is 0. In other words, any number that can be placed anywhere on the standard number line is a real number.(40 votes)

- What does
`such that`

mean in mathematics?(15 votes)- The term "such that" tends to stand in for "in a way so that" or "in order to". For example, if you were asked to make a liner system "such that" the lines were parallel, it would mean you would make a linear system with the graphs being parallel.(18 votes)

- what is domain in exact explanaition(11 votes)
- In its simplest form the domain is all the values that go into a function, and the range is all the values that come out. Sometimes the domain is restricted, depending on the nature of the function.

f(x)=x+5 - - - here there is no restriction you can put in any value for x and a value will pop out

f(x)=1/x - - - here the domain is restricted since x cannot be zero because 1/0 is undefined. So the domain here is all number except zero.

f(x)=√(x-5) - - - We cannot take the square root of a negative number, so x must be greater than or equal to 5 since for x=5 and up x-5 is positive. In this case, the domain is all numbers greater than or equal to 5.

More here:

http://www.mathsisfun.com/sets/domain-range-codomain.html(14 votes)

- In the domain and range definitions, how are skips in x written? For example, if x is more than -5 but less than 1, and more than 1 until 5. So 1 is skipped. I see how it is written in the function definition itself, but how is it written in the domain and range, which accounts for the entire span of possible outputs for all inputs? In the past two videos Sal has given examples where the functions are continuous, but not when there are skips. Even in this video where Sal combines the spans of three outputs, the spans overlap, and there is no skipping.

Would this be written as follows: ...-5≤x≤5, x≠1...? -domain example

Or something like this: All real values such that -5≤f(x)<1 or 1<f(x)≤5? -range example(10 votes)- That is a great question.

Typically if the domain is something like all values between -5 and 5 inclusive excluding 1, we write:

χ ε [-5. 5]/{1}

Basically, we write x epsilon non strict lower bound -5 and non strict upper bound 5 and then a slash and 1 in curly brackets. Likewise, if we have the domain is all real numbers except 5 and 7, we can write:

x ε R/{5, 7}(9 votes)

- it is has hard to grasps concept of each video because there is seems to be that there is no objective is mention/discuss in each video except title but that is not enough and what is context or what we are doing?(4 votes)
- If you are jumping around from video to video, that may seem like the case, but if you are following the order presented, each video builds from the previous.

Keep Studying!(14 votes)

- What value should I choose if there isn't a greater then or equal to sign in the function definition?(5 votes)
- If there is no greater than or equal to then simply the only other signs can be =,< so what you must do is find a value completely equal to or completely less than or completely greater than.

ex: x=4, x<4, 4<x(1 vote)

- I clearly understood 'Piecewise function', the only the only thing I'm stuck at is the application of this concept in real-life situation

I meant where this concept is used in 'Daily Use'(2 votes)- Postage is often a good example. For a weight of 1-5 pounds, it costs one amount, then 5.1-10, a second amount, etc. Also, sometime when you are buying things in bulk, groups of amounts that you buy will cost the same and then goes down the more you buy (this is particularly true when a store buys things at wholesale costs).(4 votes)

- around4:45why does Sal put -3 on the left side? Shouldn't he put it on the right(3 votes)
- First you need to realize that < g(x) < is saying that the leftmost number needs to be less than the rightmost number.

For this part we start with the function 1-x and the two endpoints are 3 and 4. If we solve 1-x for these two points we get -2 and -3 respectively. so even though to start 3 si less than 4, when we solve 3 gets us the larger result, at -2. Similarly 4 gets us the smaller result, at -3.

So to keep it in order we need it to look like -3 < g(x) < -2 Does that make sense?

the reason this happens is because in 1-x, we are subtracting x, so it does the reverse of the numbers being plugged in. 4 is greater than 3, but since you are subtracting you are subtracting more , making the result smaller. I also hope that makes sense. if not the main takeaway is to plug in each end point and see which is bigger and smaller.(4 votes)

- At2:19Sal talks about "such that", do you have to say "such that" for the domain? Is it a proper way of referring to the domain?(4 votes)
- At5:33, shouldn't it be 4 < g(x) ≤ -3, and not -3 < g(x) ≤ 4?(2 votes)
- Sorry, but no.
`4 < g(x) ≤ -3`

means the g(x) must be larger than 4 and at the same time smaller than or equal to -3. That's impossible. A number can't be both negative and positive at the same time.

Sal's version is correct. The range for that portion of the function will be in the interval from -3 upto 4 which is what -3 < g(x) < 4 means.

Hope this helps.(3 votes)

## Video transcript

So we have a piecewise linear function
right over here for different intervals of x. g of x is defined by a a line or the line changes depending
what interval of x we're actually in. And so let's think about its domain, and
then we'll think about its range. So the domain of this, this is a review.
The domain is the set of all inputs for which this function is defined, and our input
variable here is x. This is a set of all x values for which
this function is defined. And we see here. Anything, anything negative 6 or
lower, our function isn't defined. If it, if x is negative 6 or or lower than that. I don't --
it doesn't, it doesn't fall into one of these three intervals. So there is no definition for it.
It doesn't say hey do this in all other cases for x. It is just saying, look, if x falls into one of these three
conditions, apply this. And if x doesn't fall into one of those three
conditions, well this function g is just not defined. So, to fall into one of these three, you have
to be at least greater than negative 6. So this part right over here, the low end
of our domain is defined right over there, so we say, we could say, negative 6 is less than x and I'm leaving --
so let's write it here. All real numbers -- actually
let me write this way x, I could write it more math-y. I could say x is a member of the real numbers such that, such that negative 6 is less than x. Negative 6 is less than x and I also think about the upper bound.
So as x goes, I just wanna make sure that we fill in all the gaps between x being a greater than negative 6 and
x is less than or equal to 6. So let's see. As we go up to and including negative 3,
we're in this clause. As soon as we cross negative 3, we fall into this clause up to 4, but
as soon as we get 4, we're in this clause up to and including 6. So x at the high end is said to be less than
or equal to 6, less then or equal to 6. Now another way to say this and kind of less math-y notation is x, x can be any real number, any the real number such that, such that negative 6 is less than x is less than or equal to 6. These two
statements are equivalent. So now let's think about
the range of this function. Let's think about the range, and the range
is, this is the set of all inputs , oh sorry, this is the set of all
outputs that this function can take on, or all the
values that this function can take on. And to do that, let's just think about
as x goes, but x varies or x can be any values in this
interval. What are the different values
that g of x could take on? Let's think about that. g of x is going
to be between what and what? g of x is going to be between what and
what? g of x is going to be between what and
what? And it might actually, this might be some
equal signs there but I'm gonna worry about that in a second. So when does this thing hit its low
point? o this thing hits, hits its low point when x is as small as possible. An x is
going to be as small as possible when x is approaching negative 6. So if x were equal to negative 6, it can't
equal negative 6 herer but if x is equal to negative 6, then this thing over here
would be equal to negative 6 plus 7, would be, would be 1. So if x is greater than negative 6, g of x is going to be greater than 1, or another way
to think about it is if negative 6 is less than x, then 1 is going to be less than g of x. And the reason I said that is if I put negative 6
into this, negative 6 plus 7 is equal to 1. Now this gonna hit a
high end when it as large as possible. The largest value in this interval that
we can take on is x being equal to negative 3.
So when x is equal to negative 3, negative 3 plus 7 is equal to 4, positive 4. And it can actually take on
that value because this is less than or equal to, so we can actually take on
x equals negative 3 in which case g of x actually
will take on positive 4. So, let' do that for each of these.
Now here we have 1 minus x, so this is going to take on
its smallest value when x is as large as possible. So the largest value x can approach for,
it can't quite take on for, but it's going to approach for. So if x, let's see, if we said x was 4,
although that's not this clause here, 1 minus x, 1 minus 4 is negative 3. So as long as x is less than 4, then negative 3 is going to be less than g of x. I wanna make sure that makes sense
to you because it can be little bit confusing because this takes on its minimum value when x is approaching, or it's
approaching its minimum value when x is approaching its, when x is
approaching its maximum because we're subtracting it. So if you take the upper end, even though
this doesn't actually include 4, but as we approach for, we could say, OK, 1 negative 4 is negative 3 so that's, so g of x
is always going to be greater than that, as well it's going to be
going to be a less than. Well what happens as we approach x being equal to negative 3? So, 1 minus negative 3 is going to be positive 4. So this is going to be positive
4 right over here. And these are both less than, not less
than or equal to because these are both less than right
over here. And now let's think about this right over here. So 2x minus 11 is gonna hit its maximum value
when x is as large as possible. So its maximum value's going to be hit
when x is equal to 6 So 2 times 6 is 12, minus 11.
Well that's going to be 1. So its maximum value's going to be 1.
It's actually going to be able to hit because x can be equal to 6. Its minimum value is going to be when x
is equal to 4, and actually can be equal to 4. We have this less than or equal sign right over there.
So 2 times 4 is 8, minus 11 is negative 3. So, g of x in this case
can get as low as negative 3 when x is equal to 4. So now let's think about all of, all of the
values that g of x can take on. So we could say, we could write this a bunch of ways,
we could write g of x is going to be a member of the real
numbers such that -- let's see. What's the lowest
value g of x can take on? g of x can get as low as negative 3.
It can even be equal to negative 3. This one just has been greater the
negative 3, but here can be greater than or equal to negative 3.
So negative 3 is less than or equal to g of x, and it
can get as high as, it can get as high as Let's see. It's defined all the way to
1 and then -- or I shouldn't say it is defined all the way to 1.
It can take on values up to 1 but it can also take on values beyond 1.
It can take on values all the way up to including 4 over here. So it can take on values up to and including 4. So g of x is a member
real numbers such that negative 3 is less than or equal to g of x
is less than or equal to 4. So the set of all values
that g of x can take on between, including and including negative 3 and positive 4.