{"id":4174,"date":"2010-02-22T21:50:20","date_gmt":"2010-02-22T13:50:20","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=4174"},"modified":"2010-02-26T09:07:51","modified_gmt":"2010-02-26T01:07:51","slug":"functions","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/functions-4174","title":{"rendered":"Functions"},"content":{"rendered":"<p>A lot of people have difficulty with  <strong>functions<\/strong> in math. I suspect  it's because function notation is not very learner-friendly.<\/p>\n<p>Yousuf, one of my regular correspondents, got stuck on the following problem recently.<\/p>\n<p><b>What is the area of the rectangle ADEB shown in the diagram?<\/b><\/p>\n<p>The curve is the graph of <em>y<\/em> = 1\/<em>x<\/em><sup>2<\/sup> (for positive <em>x<\/em>), and <em>r<\/em> is some arbitrary value of <em>x<\/em>.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/rectangle.gif\" width=\"415\" height=\"382\" alt=\"rectangle\" \/> <\/p>\n<p>We'll come back to this question a little later. I suspect his problem with this question was due to a rusty conceptual understanding of functions.<\/p>\n<h2>Functions Overview<\/h2>\n<p>A function is simply an expression involving variable(s). <\/p>\n<p>We usually write a function of the variable <em>x<\/em> using the notation: <em>f<\/em>(<em>x<\/em>). A function has at most 1 value for each value of <em>x<\/em>.<\/p>\n<p>For example, if  <em>f<\/em>(<em>x<\/em>) = 5<em>x<\/em><sup>2<\/sup> + 3, we can find the value of the function if we choose <em>x <\/em>= 0 as follows.<\/p>\n<p><em>f<\/em>(0) = 5(0)<sup>2<\/sup> + 3 = 5 &times; 0 + 3 = 3 <\/p>\n<p>Now, this is a good example of the <strong>notation<\/strong> problem I was talking about at the beginning. We write &quot;<em>f<\/em>(0)&quot; (<em>f<\/em> bracket 0 bracket) to mean &quot;evaluate the function expression by substuting 0 every time we see an <em>x<\/em>&quot; and we see this on the left hand side of this equation.<\/p>\n<p>But on the right hand side, I have written  &quot;5(0)<sup>2<\/sup>&quot; (5 bracket 0 bracket squared) and this means &quot;5 &times; 0<sup>2<\/sup>&quot;. We need to be careful with this - writing 2 different concepts with what is essentially the same notation. <\/p>\n<p>It is a shame that function notation is so clumsy and causes problems for newbies. <\/p>\n<p>Let's look at some more examples for our function <em>f<\/em>(<em>x<\/em>) = 5<em>x<\/em><sup>2<\/sup> + 3. <\/p>\n<p><em>f<\/em>(2) = 5(2)<sup>2<\/sup> + 3 = 5 &times; 4 + 3 = 23.<\/p>\n<p><em>f<\/em>(10) = 5(10)<sup>2<\/sup> + 3 = 5 &times; 100 + 3 = 503.<\/p>\n<p>If we were to substitute many more values of <em>x<\/em> and plot the dots on a graph, we would get the following:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/x2plus3.gif\" alt=\"x^2 + 3\" width=\"246\" height=\"336\" \/> <\/p>\n<p><strong>Note: <\/strong>On the vertical axis, I put <em>f<\/em>(<em>x<\/em>), but I could have also put &quot;<em>y<\/em>&quot;, since the convention in math is the vertical axis represents the function value. Often you'll see it written <em>y = f<\/em>(<em>x<\/em>).<\/p>\n<p>OK so far?<\/p>\n<p>Now, let's make things a bit more interesting. What is  <em>f<\/em>(<em>a<\/em>)? We just substitute <em>a<\/em>  everywhere there is an <em>x<\/em> in the original function, like we did before with the numbers:<\/p>\n<p><em>f<\/em>(<em>a<\/em>) = 5(<em>a<\/em>)<sup>2<\/sup> + 3 = 5<em>a<\/em><sup>2<\/sup> + 3<\/p>\n<p>Let's do another. In this next case, <em>f<\/em>(<em>a<\/em> + 4), we are just replacing each <em>x<\/em> in the original function expression with <em>a<\/em> + 4. <\/p>\n<p><em>f<\/em>(<em>a<\/em> + 4) = 5(<em>a<\/em> + 4)<sup>2<\/sup> + 3 = 5(<em>a<\/em><sup>2<\/sup> + 8<em>a<\/em> + 16) + 3 = 5<em>a<\/em><sup>2<\/sup> + 40<em>a<\/em> + 83<\/p>\n<p>Of course, we need to be careful to expand out the brackets properly!<\/p>\n<h2>A Different Function<\/h2>\n<p>Let's change our function to <img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/1onx2.gif\" alt=\"1\/(x^2)\" width=\"69\" height=\"36\" style=\"position:relative;top:13px;\" \/> . <\/p>\n<p>This is the curve we met in the question at the the beginning of this article. <\/p>\n<p>If <em>x<\/em> = 1<em>, <\/em>we replace every <em>x<\/em> in our expression with 1 and we have:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/f1.gif\" alt=\"f(1)\" width=\"134\" height=\"44\" \/><\/p>\n<p>What <em>f<\/em>(1)  means on a graph is the distance from the <em>x-<\/em>axis to the graph is  1 unit. The function value is the <strong>height<\/strong> of the graph for that <em>x<\/em>-value.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/AB.gif\" alt=\"AB\" width=\"256\" height=\"188\" \/><\/p>\n<p>Now let's do <em>f<\/em>(3<em>a<\/em>).<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/f3a.gif\" alt=\"f(3a)\" width=\"148\" height=\"41\" \/>  <\/p>\n<p>The value <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/1over9a2.gif\" alt=\"1 \/ 9a^2\" width=\"28\" height=\"38\"  \/> <\/p>\n<p>represents the height of the graph when <em>x<\/em> = 3<em>a.<\/em> We need to be careful with the brackets. <\/p>\n<h2>Back to Our Problem <\/h2>\n<p>Here's the graph again:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/rectangle2.gif\" width=\"249\" height=\"189\" alt=\"rectangle\" \/><\/p>\n<p>So how do we find the area of the rectangle BADE? The <strong>width <\/strong>of the rectangle is quite straightforward, as the distance from <em>r<\/em> to <em>r<\/em> &minus; 1 is just 1 unit. But we need to find the height AD. <\/p>\n<p>AD is just the function value <em>f<\/em>(<em>r<\/em>):<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/fr.gif\" alt=\"f(r)\" width=\"117\" height=\"43\" \/><\/p>\n<p>So the area of the rectangle is just <\/p>\n<p>Area = width &times; height =   <img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/1overr2.gif\" alt=\"1\/r^2\" width=\"74\" height=\"42\" style=\"vertical-align:-15px\" \/><\/p>\n<h2>What if we needed the height BC?<\/h2>\n<p>We would just find the function value as follows.<\/p>\n<p>BC = <img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/fnrminus1.gif\" alt=\"f(r - 1)\" width=\"135\" height=\"44\" style=\"vertical-align:-18px;\" \/><\/p>\n<h2>Functions of 2 Variables<\/h2>\n<p>The functions above only have one variable and they describe a curve in 2-D space.<\/p>\n<p>To describe a 3-D surface, we need to  use 2 variables. <\/p>\n<p>We write a function of 2 variables using this notation:<\/p>\n<p><em>z = f<\/em>(<em>x,y<\/em>)<\/p>\n<p>The &quot;<em>z<\/em>&quot; indicates the height of the surface for particular values of    <em>x<\/em> and <em>y<\/em>.<\/p>\n<p>An example of a 3-dimensional surface is <em>z<\/em> = <em>x<\/em><sup>2<\/sup> + 3 sin<em> y.<\/em><\/p>\n<p><em><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/x2plus3siny.gif\" alt=\"x^2 + 3 sin y\" width=\"413\" height=\"259\" \/><\/em><\/p>\n<h2>More Information <\/h2>\n<p>See this  chapter for a lot more examples of functions: <a href=\"https:\/\/www.intmath.com\/functions-and-graphs\/functions-graphs-intro.php\">Functions and Graphs<\/a>. (2 dimensional)<\/p>\n<p>This is an introduction to <a href=\"https:\/\/www.intmath.com\/vectors\/6-3-dimensional-space.php\">3-dimensional Coordinate System.<\/a><\/p>\n<p>See also <a href=\"https:\/\/www.intmath.com\/blog\/learn-math\/towards-more-meaningful-math-notation-661\">Towards more meaningful math notation<\/a> where I suggest an alternative to the current confusion. <\/p>\n<p class=\"alt\">See the <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/functions-4174#comments\" id=\"comms\">14 Comments<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/functions-4174\"><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2010\/02\/functions_th.gif\" alt=\"functions\" title=\"functions\" width=\"126\" height=\"103\" class=\"imgRt\" \/><\/a>The concept of functions causes a lot of confusion. This article attempts to make things a bit clearer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[134],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/4174"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=4174"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/4174\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=4174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=4174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=4174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}