<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Composition of functions</name>
  <metadata>
  <md:version>1.4</md:version>
  <md:created>2007/10/14 08:59:07 GMT-5</md:created>
  <md:revised>2007/11/21 11:13:57.155 US/Central</md:revised>
  <md:authorlist>
      <md:author id="Sunil_Singh">
      <md:firstname>Sunil</md:firstname>
      <md:othername>Kumar</md:othername>
      <md:surname>Singh</md:surname>
      <md:email>sunilkr99@yahoo.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="Sunil_Singh">
      <md:firstname>Sunil</md:firstname>
      <md:othername>Kumar</md:othername>
      <md:surname>Singh</md:surname>
      <md:email>sunilkr99@yahoo.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Cartesian</md:keyword>
    <md:keyword>complements</md:keyword>
    <md:keyword>composition</md:keyword>
    <md:keyword>diagram</md:keyword>
    <md:keyword>difference</md:keyword>
    <md:keyword>intersection</md:keyword>
    <md:keyword>proper</md:keyword>
    <md:keyword>relation</md:keyword>
    <md:keyword>sets</md:keyword>
    <md:keyword>subsets</md:keyword>
    <md:keyword>union</md:keyword>
    <md:keyword>unions</md:keyword>
    <md:keyword>universal</md:keyword>
    <md:keyword>venn</md:keyword>
  </md:keywordlist>

  <md:abstract/>
</metadata>
  <content>
<para id="element-1">Function is a relation on two sets by a rule. It is a special mapping between two sets. It emerges that it is possible to combine two functions, provided co-domain of one function is domain of another function.   The composite function is a relation by a new rule between sets, which are not common to the functions.
</para>
<para id="element-2">We can understand composition in terms of two functions. Let there be two functions defined as :
</para>
<para id="element-3">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mo>:</m:mo>
    <m:mi>A</m:mi>
    <m:mo>→</m:mo>
    <m:mi>B</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>by</m:mtext>
    <m:mspace width="1em"/>
    <m:mtext>f(x) for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>A</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-4">
<m:math display="block">
  <m:mrow>
    <m:mi>g</m:mi>
    <m:mo>:</m:mo>
    <m:mi>B</m:mi>
    <m:mo>→</m:mo>
    <m:mi>C</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>by</m:mtext>
    <m:mspace width="1em"/>
    <m:mtext>g(x) for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>B</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-5">Observe that set “B” is common to two functions. The rules of the functions are given by “f(x)” and “g(x)” respectively. Our objective here is to define a new function 
<m:math>
  <m:mrow>
    <m:mi>h</m:mi>
    <m:mo>:</m:mo>
    <m:mi>A</m:mi>
    <m:mo>→</m:mo>
    <m:mi>C</m:mi>
  </m:mrow>
</m:math>
 and its rule.
</para>
<para id="element-6">Thinking in terms of relation, “A” and “B” are the domain and co-domain of the function “f”. It means that every element “x” of “A” has an image “f(x)” in “B”. </para>
<para id="element-7">Similarly, thinking in terms of relation, “B” and “C” are the domain and co-domain of the function “g”. In this function, "f(x)" – which was the image of pre-image “x” in “A” – is now pre-image for the function “g”. There is a corresponding unique image in set "C". Following the symbolic notation, "f(x)" has image denoted by "g(f(x))" in "C".  The figure here depicts the relationship among three sets via two functions (relations) and the combination function. 
</para>
<para id="element-14"><figure id="fig-14">
<name> Composition of two functions </name>
<media type="image/gif" src="cf1a.gif"/>
<caption> Composition functions is a special relation between sets not common to two functions.</caption>
</figure>
</para>
<para id="element-8">For every element, “x” in “A”, there exists an element f(x) in set “B”. This is the requirement of function “f” by definition. For every element “f(x)” in “B”, there exists an element g(f(x)) in set “B”. This is the requirement of function “g” by definition. It follows, then, that for every element “x” in “A”, there exists an element g(f(x)) in set “C”. This concluding statement is definition of a new function  :
</para>
<para id="element-9">
<m:math display="block">
  <m:mrow>
    <m:mi>h</m:mi>
    <m:mo>:</m:mo>
    <m:mi>A</m:mi>
    <m:mo>→</m:mo>
    <m:mi>C</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>by</m:mtext>
    <m:mspace width="1em"/>
    <m:mtext>g(f(x)) for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>A</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-10">By convention, we call this new function as “gof” and is read as "g circle f" or "g composed with f".
</para>
<para id="element-11">
<m:math display="block">
  <m:mrow>
    <m:mi>g</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>f</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
    <m:mspace width="1em"/>
    <m:mtext>for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>A</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-12">
The two symbolical representations are equivalent.
</para>
<section id="section-1">
<name>Example </name>
<para id="element-15"><term>Problem 1: </term>Let two sets be defined as :
</para>
<para id="element-16">
<m:math display="block">
  <m:mrow>
    <m:mi>h</m:mi>
    <m:mo>:</m:mo>
    <m:mi>R</m:mi>
    <m:mo>→</m:mo>
    <m:mi>R</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>by</m:mtext>
    <m:mspace width="1em"/>
    <m:msup>
      <m:mi>x</m:mi>
      <m:mn>2</m:mn>
    </m:msup>
    <m:mspace width="1em"/>
    <m:mtext>for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>R</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-17">
<m:math display="block">
  <m:mrow>
    <m:mi>k</m:mi>
    <m:mo>:</m:mo>
    <m:mi>R</m:mi>
    <m:mo>→</m:mo>
    <m:mi>R</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>by</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mspace width="1em"/>
    <m:mtext>for all</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>∈</m:mo>
    <m:mi>R</m:mi>
  </m:mrow>
</m:math>
</para>
<para id="element-18">
Determine “hok” and “koh”.
</para>
<para id="element-19"><term>Solution : </term>According to definition,
</para>
<para id="element-20">
<m:math display="block">
  <m:mrow>
    <m:mi>h</m:mi>
    <m:mi>o</m:mi>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>k</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-21">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>h</m:mi>
    <m:mi>o</m:mi>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>+</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-22">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>h</m:mi>
    <m:mi>o</m:mi>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:msup>
      <m:mfenced>
        <m:mrow>
          <m:mi>x</m:mi>
          <m:mo>+</m:mo>
          <m:mn>1</m:mn>
        </m:mrow>
      </m:mfenced>
      <m:mn>2</m:mn>
    </m:msup>
  </m:mrow>
</m:math>
</para>
<para id="element-23">Again, according to definition,
</para>
<para id="element-24">
<m:math display="block">
  <m:mrow>
    <m:mi>k</m:mi>
    <m:mi>o</m:mi>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>h</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-25">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>k</m:mi>
    <m:mi>o</m:mi>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:msup>
          <m:mi>x</m:mi>
          <m:mn>2</m:mn>
        </m:msup>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-26">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>k</m:mi>
    <m:mi>o</m:mi>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:msup>
          <m:mi>x</m:mi>
          <m:mn>2</m:mn>
        </m:msup>
        <m:mo>+</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-27">Importantly note that <m:math>
  <m:mrow>
    <m:mi>h</m:mi>
    <m:mi>o</m:mi>
    <m:mi>k</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>≠</m:mo>
    <m:mi>k</m:mi>
    <m:mi>o</m:mi>
    <m:mi>h</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>. It indicates that composition of functions is not commutative.
</para>
</section>
<section id="section-2">
<name>Existence of composition set </name>
<para id="element-28">In accordance with the definition of function, “f”, the range of “f” is a subset of its co-domain “B”. But, set “B” is the domain of function “g” such that there exists image g(f(x)) in “C” for every “x” in “A”. This means that range of “f” is subset of domain of “g” :
</para>
<para id="element-29">
<m:math display="block">
  <m:mrow>
    <m:mtext>Range of “f”</m:mtext>
    <m:mo>⊂</m:mo>
    <m:mtext>Domain of “g”</m:mtext>
  </m:mrow>
</m:math>
</para>
<para id="element-30">Clearly, if this condition is met, then composition “gof” exists. Following this conclusion, “fog” will exist, if 
</para>
<para id="element-31">
<m:math display="block">
  <m:mrow>
    <m:mtext>Range of “g”</m:mtext>
    <m:mo>⊂</m:mo>
    <m:mtext>Domain of “f”</m:mtext>
  </m:mrow>
</m:math>
</para>
<para id="element-32">And, if both conditions are met simultaneously, then we can conclude that both “gof” and “fog” exist. Such possibility is generally met when all sets involved are set of real numbers, “R”.
</para>
<section id="section-2a">
<name>Example </name>
<para id="element-33"><term>Problem 2: </term> Let two functions be defined as :
</para>
<para id="element-34">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>1,2</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>2,3</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>3,4</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>4,5</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-35">
<m:math display="block">
  <m:mrow>
    <m:mi>g</m:mi>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>2,4</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>3,2</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>4,3</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>,</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mn>5,1</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-36">Check whether “gof” and “fog” exit for the given functions?
</para>
<para id="element-37"><term>Solution : </term>Here,
</para>
<para id="element-38">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Domain of “f”</m:mtext>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mn>1,2,3,4</m:mn>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-39">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Range of “f”</m:mtext>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mn>2,3,4,5</m:mn>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-40">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Domain of “g”</m:mtext>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mn>2,3,4,5</m:mn>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-41">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Range of “g”</m:mtext>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mn>4,2,3,1</m:mn>
    <m:mo>}</m:mo>
    <m:mo>=</m:mo>
    <m:mo>{</m:mo>
    <m:mn>1,2,3,4</m:mn>
    <m:mo>}</m:mo>
  </m:mrow>
</m:math>
</para>
<para id="element-42">Hence, 
</para>
<para id="element-43">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Range of “f”</m:mtext>
    <m:mo>⊂</m:mo>
    <m:mtext>Domain of “g”</m:mtext>
  </m:mrow>
</m:math>
</para>
<para id="element-44">and
</para>
<para id="element-45">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mtext>Range of “g”</m:mtext>
    <m:mo>⊂</m:mo>
    <m:mtext>Domain of “f”</m:mtext>
  </m:mrow>
</m:math>
</para>
<para id="element-46">It means that both compositions “gof” and “fog” exist for the given sets.
</para>
</section>
</section>
<section id="section-3">
<name>Domain of Composition </name>
<para id="element-47">Composition of two functions results in new rule for the new composite function. The expression of new rule may prohibit certain elements of the original domain set. For example, consider the function,
</para>
<para id="element-48"><m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mn>1</m:mn>
      <m:mrow>
        <m:mfenced>
          <m:mrow>
            <m:mn>1</m:mn>
            <m:mo>-</m:mo>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfrac>
    <m:mspace width="1em"/>
    <m:mtext>when</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>≠</m:mo>
    <m:mn>1</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-49">Clearly, the domain of function is R – {1}. Let us now see the expression of composition of function with itself,
</para>
<para id="element-50">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>f</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mn>1</m:mn>
      <m:mrow>
        <m:mn>1</m:mn>
        <m:mo>−</m:mo>
        <m:mfrac>
          <m:mn>1</m:mn>
          <m:mfenced>
            <m:mrow>
              <m:mn>1</m:mn>
              <m:mo>−</m:mo>
              <m:mi>x</m:mi>
            </m:mrow>
          </m:mfenced>
        </m:mfrac>
      </m:mrow>
    </m:mfrac>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mrow>
        <m:mn>1</m:mn>
        <m:mo>−</m:mo>
        <m:mi>x</m:mi>
      </m:mrow>
      <m:mrow>
        <m:mn>1</m:mn>
        <m:mo>−</m:mo>
        <m:mi>x</m:mi>
        <m:mo>−</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfrac>
  </m:mrow>
</m:math>
</para>
<para id="element-51">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>−</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfrac>
  </m:mrow>
</m:math>
</para>
<para id="element-52">This expression is valid for real values of “x” when <m:math>
  <m:mrow>
    <m:mi>x</m:mi>
    <m:mo>≠</m:mo>
    <m:mn>0</m:mn>
  </m:mrow>
</m:math>. Thus, we see that new rule has changed the domain of resulting function. The domain of the composition fof(x) is "R - {0,1}".
</para>
<para id="element-53">
If functions “f” and “g” having different intervals of real numbers are involved in the composition, then we consider both the intervals and determine the domain of the composition by meeting requirement of both intervals (common interval). This aspect is illustrated in the examples given in the next section.
</para>
<section id="section-3a">
<name>Algorithm for finding interval of composition </name>
<para id="element-100">The most important aspect of working with composition of function is to combine intervals i.e. domains of two functions. Consider for example the function given by :</para>
<para id="element-101"><m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-102"><m:math display="block">
  <m:mrow>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mo>|</m:mo>
    <m:mi>x</m:mi>
    <m:mo>|</m:mo>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>3</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-103">Here, "|x|" is modulus function, which returns non-negative number for all real values of "x". We are required to find fog(x). What would be the domain of the resulting composition? Let us have a closer look at the definition of composition,</para>
<para id="element-104"><m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>g</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mo>|</m:mo>
        <m:mi>x</m:mi>
        <m:mo>|</m:mo>
      </m:mrow>
    </m:mfenced>

  </m:mrow>
</m:math>
  </para>
<para id="element-105">In plain words, it means that argument of the function “f” is the function “g” itself. The function “f” is defined in the domain "0 ≤ x ≤ 2", whereas function “g” is defined in "0≤x≤3". From the expression of composition as above, it is clear that we need to ensure that value of “x” should lie in the domain interval of function “g”. Hence,</para>
<para id="element-106"><m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>g</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mo>|</m:mo>
        <m:mi>x</m:mi>
        <m:mo>|</m:mo>
      </m:mrow>
    </m:mfenced>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>3</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-107">But function “f” is defined for values of “x”, which lie in its interval “0≤x≤2”. So when we expand the composition in accordance with the rule of function “f”, we should ensure that value of its argument – note that it is not the value of independent variable “x” - lies in the interval specified by its domain. </para>
<para id="element-108"><m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mo>|</m:mo>
    <m:mi>x</m:mi>
    <m:mo>|</m:mo>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mo>|</m:mo>
    <m:mi>x</m:mi>
    <m:mo>|</m:mo>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
    <m:mspace width="1em"/>
    <m:mtext>and</m:mtext>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>3</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-109">Note that interval of function “f” is written with respect to function “g” i.e. “|x|” – not “x”. Since requirements of both functions are required to be met simultaneously, the domain of the resulting composition is intersection of two domains. It is this reason that we use either “and” or a comma “,” to combine two intervals.</para>
<para id="element-110">Now, we interpret the interval of modulus function “0≤ |x| ≤2”. We see that part of the interval, "|x| ≥0",  is always true for all values of “x”. Whereas part of the interval, "|x| ≤2", means (we shall learn about interpreting modulus inequality in a separate module) :</para>
<para id="element-111"><m:math display="block">
  <m:mrow>
    <m:mo>-</m:mo>
    <m:mn>2</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-112">Combining intervals of two parts of the interval “0≤ |x| ≤2”, we conclude that it is equal to :</para>
<para id="element-113"><m:math display="block">
  <m:mrow>
    <m:mo>-</m:mo>
    <m:mn>2</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-114">Hence,</para>
<para id="element-115"><m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mo>|</m:mo>
    <m:mi>x</m:mi>
    <m:mo>|</m:mo>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mo>-</m:mo>
    <m:mn>2</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
    <m:mspace width="1em"/>
    <m:mtext>and</m:mtext>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>3</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-116"><m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mo>|</m:mo>
    <m:mi>x</m:mi>
    <m:mo>|</m:mo>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>

</section>
</section>
<section id="section-4">
<name>Examples </name>
<section id="section-4a">
<para id="element-54"><term>Problem 3: </term>Consider the function as given here :
</para>
<para id="element-55">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>

<para id="element-57">Determine fof(x).
</para>
<para id="element-58"><term>Solution : </term> The composition of the function with itself is :
</para>
<para id="element-59">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>f</m:mi>
        <m:mfenced>
          <m:mrow>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>+</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-60">
<m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>+</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfenced>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>1</m:mn>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
    <m:mspace width="1em"/>
    <m:mtext>and</m:mtext>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-61">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>2</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mo>-</m:mo>
    <m:mn>1</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>1</m:mn>
    <m:mspace width="1em"/>
    <m:mtext>and</m:mtext>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>2</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-62">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mi>x</m:mi>
    <m:mo>+</m:mo>
    <m:mn>2</m:mn>
    <m:mo>;</m:mo>
    <m:mspace width="1em"/>
    <m:mn>0</m:mn>
    <m:mo>≤</m:mo>
    <m:mi>x</m:mi>
    <m:mo>≤</m:mo>
    <m:mn>1</m:mn>
  </m:mrow>
</m:math>
</para>





</section>
<section id="section-4b">
<para id="element-68"><term>Problem 4: </term> A function is defined for real values by :
</para>
<para id="element-69">
<m:math display="block">
  <m:mrow>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mn>1</m:mn>
      <m:mrow>
        <m:mfenced>
          <m:mrow>
            <m:mn>1</m:mn>
            <m:mo>-</m:mo>
            <m:mi>x</m:mi>
          </m:mrow>
        </m:mfenced>
      </m:mrow>
    </m:mfrac>
    <m:mspace width="1em"/>
    <m:mtext>for all real values except</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>=</m:mo>
    <m:mn>1</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-70">Determine f[f{f(x)}] and draw the graph of resulting composition.
</para>
<para id="element-71"><term>Solution : </term>  This is composition triplet. We have already seen that :
</para>
<para id="element-72"><m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mo>{</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>}</m:mo>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>-</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
      <m:mi>x</m:mi>
    </m:mfrac>
    <m:mspace width="1em"/>
    <m:mtext>when</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>≠</m:mo>
    <m:mn>0</m:mn>
    <m:mo>,</m:mo>
    <m:mn>1</m:mn>

  </m:mrow>
</m:math>
</para>
<para id="element-73">Compositing again with f(x), we have :
</para>
<para id="element-74"><m:math display="block">
  <m:mrow>
    <m:mo>⇒</m:mo>
    <m:mrow>
      <m:mi>f</m:mi>
      <m:mo>[</m:mo>
      <m:mi>f</m:mi>
      <m:mo>{</m:mo>
      <m:mi>f</m:mi>
      <m:mfenced>
        <m:mrow>
          <m:mi>x</m:mi>
        </m:mrow>
      </m:mfenced>
      <m:mo>}</m:mo>
      <m:mo>]</m:mo>
    </m:mrow>
    <m:mo>=</m:mo>
    <m:mrow>
      <m:mfrac>
        <m:mn>1</m:mn>
        <m:mrow>
          <m:mn>1</m:mn>
          <m:mo>−</m:mo>
          <m:mfrac>
            <m:mrow>
              <m:mfenced>
                <m:mrow>
                  <m:mi>x</m:mi>
                  <m:mo>−</m:mo>
                  <m:mn>1</m:mn>
                </m:mrow>
              </m:mfenced>
            </m:mrow>
            <m:mi>x</m:mi>
          </m:mfrac>
        </m:mrow>
      </m:mfrac>
    </m:mrow>
    <m:mo>=</m:mo>
    <m:mfrac>
      <m:mi>x</m:mi>
      <m:mrow>
        <m:mi>x</m:mi>
        <m:mo>−</m:mo>
        <m:mi>x</m:mi>
        <m:mo>+</m:mo>
        <m:mn>1</m:mn>
      </m:mrow>
    </m:mfrac>
    <m:mspace width="1em"/>
    <m:mtext>when</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>≠</m:mo>
    <m:mn>0</m:mn>
    <m:mo>,</m:mo>
    <m:mn>1</m:mn>
  </m:mrow>
</m:math>
</para>
<para id="element-75"><m:math display="block">
  <m:mrow>
    <m:mi>y</m:mi>
    <m:mo>=</m:mo>
    <m:mi>f</m:mi>
    <m:mo>[</m:mo>
    <m:mi>f</m:mi>
    <m:mo>{</m:mo>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>}</m:mo>
    <m:mo>]</m:mo>
    <m:mo>=</m:mo>
    <m:mi>x</m:mi>
    <m:mspace width="1em"/>
    <m:mtext>when</m:mtext>
    <m:mspace width="1em"/>
    <m:mi>x</m:mi>
    <m:mo>≠</m:mo>
    <m:mn>0</m:mn>
    <m:mo>,</m:mo>
    <m:mn>1</m:mn>
  </m:mrow>
</m:math> 
</para><para id="element-383">The graph of the composition is as shown here :</para><para id="element-639"><figure id="fig-639">
<name> Plot of compostion </name>
<media type="image/gif" src="cf2.gif"/>
<caption> The plot is a straight line with two undefined points.</caption>
</figure></para>
</section>
<section id="section-4c">
<para id="element-76"><term>Problem 5: </term> A function is defined for real values by :
</para>
<para id="element-77">
<code type="block">
       | 1 + x ;  0 ≤ x ≤ 2    
f(x) = |  
       | 3 – x ;  2 &lt; x ≤ 3  
</code>   
</para>
<para id="element-78">Determine f(f(x)). 
</para>
<para id="element-79"><term>Solution :</term> The function “f(x)” is combined with itself. Here,
</para>
<para id="element-80">
<code type="block">
          | f(1 + x) ;  0 ≤ x ≤ 2    
f(f(x)) = |
          | f(3 - x) ;  2 &lt; x ≤ 3    
</code> 
</para>
<para id="element-81">We need to evaluate function for each of the above two intervals :
</para>
<para id="element-82">
<code type="block">
f(1 + x) ;  0 ≤ x ≤ 2 
</code>    
</para>
<para id="element-83">
<code type="block">
  | 1 + (1+x) ; 0 ≤ 1+ x ≤ 2 and 0 ≤ x ≤ 2    
= |
  | 3 – (1+x); 2 &lt; 1+ x ≤ 3 and 0 ≤ x ≤ 2  
</code>   
</para>
<para id="element-84">
<code type="block">
  | 2 + x ; -1 ≤ x ≤ 1 and 0 ≤ x ≤ 2    
= |
  | 2 – x ; 1 &lt; x ≤ 2 and 0 ≤ x ≤ 2 
</code> 
</para>
<para id="element-85">
<code type="block">
  | 2 + x ; 0 ≤ x ≤ 1 
= |
  | 2 – x ; 1 &lt; x ≤ 2 
</code> 
</para>
<para id="element-86">
Similarly,
</para>
<para id="element-87">
<code type="block">
f(3 - x) ;  2 &lt; x ≤ 3
</code>     
</para>
<para id="element-88">
<code type="block">
  | 1 + (3-x) ; 0 ≤ 3- x ≤ 2 and 2 &lt; x ≤ 3    
= |
  | 3 – (3-x) ; 2 &lt; 3- x ≤3 and 2 &lt; x ≤3  
</code>   
</para>
<para id="element-89">
<code type="block">
  | 4 - x ;  -3 ≤ x ≤ -1 and 2 &lt; x ≤ 3    
= |
  | x     ; -1 &lt; x ≤ 0 and 2 &lt; x ≤ 3  
</code>  
</para>
<para id="element-90">
<code type="block">
  | 4 - x ;  1 ≤ x ≤ 3 and 2 &lt; x ≤ 3    
= |
  | x     ; 0 &lt; x ≤ 1 and 2 &lt; x ≤ 3 
</code>    
</para>
<para id="element-91">
<code type="block">
  | 4 - x ;  2 &lt; x ≤ 3    
= |
  |   x   ; No common interval  
</code> 
</para>
<para id="element-92">
<code type="block">
= | 4 - x ;  2 &lt; x ≤ 3    
</code> 
</para>
<para id="element-93">Putting the results in the expression of “fof”, we have :
</para>
<para id="element-94">
<code type="block">
          | 2 + x ; 0 ≤ x ≤1
f(f(x)) = | 2 – x ; 1 &lt; x ≤ 2
          | 4 - x ; 2 &lt; x ≤ 3  
</code>   
</para>
</section>
</section>
<section id="section-5">
<name>Properties of composition </name>
<para id="element-96">The composition is generally not commutative except for some special functions. 
</para>
<para id="element-97">
<m:math display="block">
  <m:mrow>
    <m:mi>g</m:mi>
    <m:mi>o</m:mi>
    <m:mi>f</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mo>≠</m:mo>
    <m:mi>f</m:mi>
    <m:mi>o</m:mi>
    <m:mi>g</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>x</m:mi>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
<para id="element-98">On the other hand, composition among three functions is independent of parentheses and hence is associative.
</para>
<para id="element-99">
<m:math display="block">
  <m:mrow>
    <m:mfenced>
      <m:mrow>
        <m:mi>g</m:mi>
        <m:mi>o</m:mi>
        <m:mi>f</m:mi>
      </m:mrow>
    </m:mfenced>
    <m:mi>o</m:mi>
    <m:mi>h</m:mi>
    <m:mo>=</m:mo>
    <m:mi>g</m:mi>
    <m:mi>o</m:mi>
    <m:mfenced>
      <m:mrow>
        <m:mi>f</m:mi>
        <m:mi>o</m:mi>
        <m:mi>h</m:mi>
      </m:mrow>
    </m:mfenced>
  </m:mrow>
</m:math>
</para>
</section>


  </content>
  
</document>
