# A problem in understanding the Intermediate Value Theorem

So, IVT essentially says if a function $$f$$ is continuous over an interval $$[a,b]$$, then the function $$f$$ will take up all the values between $$f(a)$$ and $$f(b)$$ at least once at some point in the interval $$[a,b]$$.

Now, suppose $$f$$ is continuous between $$[3,7]$$ and $$f(3) = 4$$ and $$f(7) = 25$$

According to IVT, $$f(3) = 4 < m < 25 = f(7)$$, i.e., the function takes up all the values between $$f(3)$$ and $$f(7)$$ at least once in the interval. But, according to the below picture, clearly, the function within that interval takes up values different that do not satisfy the above inequality. Please help me fill the gap in my understanding of IVT here.

Please do correct me if I'm mistaken.

This doubt arose from the below KhanAcademy question

• IVT doesn't tell you that ALL values must be between $f(a)$ and $f(b)$ -- it tells you that every value between $f(a)$ and $f(b)$ must be attained. – Nick Peterson Feb 25 at 6:59
• The IVT says that $f$ reaches all values between $f(3)$ and $f(7)$. It doesn't say it can't reach other values as well. – Mathematician 42 Feb 25 at 6:59
• @SathvikR. If it helps: you seem to be interpreting it as: $x\in(a,b)$ implies $f(x)\in (f(a), f(b))$ (assuming $f(a)<f(b)$, etc). But the actual implication is: for all $y\in (f(a), f(b))$, there exists $x\in(a, b)$ so that $f(x)=y$. – Nick Peterson Feb 25 at 7:06
• IVT only says that all values between $4$ and $25$ will be obtained. And in that picture they clearly all are. The IVT says NOTHING at all about values outside $[4,25]$. It doesn't say they are obtained. It doesn't say they aren't obtained. – fleablood Feb 25 at 7:21
• Okay.... it says that every possible output value between $f(3) = 4$ and $f(7) = 25$ will be obtained somewhere in the interval between $3$ and $7$. But it doesn't say that values between $4$ and $25$ are the only values obtained. If I told you that every dog in the Golden Gate Dog shelter has an owner who lives in San Francisco, that does not mean everyone who lives in San Francisco owns a dog in the Golden Gate Dog shelter.... to be continued.... – fleablood Feb 25 at 7:29

The intermediate value theorem tells you that, in that context, for each $$y\in[4,25]$$, there is some $$x\in[3,4]$$ such that $$f(x)=y$$. It does not tell you that if $$x\in[3,4]$$, then $$f(x)\in[4,25]$$. So, there is no contradiction if $$f\bigl([3,4]\bigr)$$ contains values outside $$[4,25]$$.