If $\alpha:S\rightarrow T$ and $\beta:T\rightarrow U$
                then the 
                
                    composition (or composite) of $\alpha$ and $\beta$
                    is
                
                \(
                    \beta\circ\alpha:S\rightarrow U
                \)
                and
                \(
                    (\beta\circ\alpha)(x)=\beta(\alpha(x)).
                \)
                Note carefully, in $\beta\circ\alpha$, it is $\alpha$
                the mapping on the right, that is applied first.
            
        
        
            
                
                Let $S=\{x,y,z\},$
                $T=\{1,2,3\},$
                $U=\{a,b,c\},$
                $\alpha:(x,y,z)\mapsto(2,1,3),$
                $\beta:(1,2,3)\mapsto(b,c,a).$
                Then $\beta\circ\alpha:(x,y,z)\mapsto(c,b,a)$
            
        
        
            
                
                It is possible for $\beta\circ\alpha\ne\alpha\circ\beta.$
                Composition is not necessarily 
                
                    commutative.
                
                Let
                $\alpha:\R\rightarrow \R,$
                $\beta:\R\rightarrow \R,$
                $\alpha(x)=x^2+2,$
                $\beta(x)=x-1.$
                Then $(\alpha\circ\beta)(0)=3$
                but $(\beta\circ\alpha)(0)=1.$
            
        
        
            
            Assume that $\alpha:S\rightarrow T$
            and $\beta:T\rightarrow U.$
            
                - 
                    If $\alpha$ and $\beta$ are onto,
                    then $\beta\circ\alpha$ is onto.
                
 
                - 
                        If $\beta\circ\alpha$ is onto,
                        then $\beta$ is onto.
                        
                        
                        $\alpha$ is not onto iff $\beta$ 
                        is not one-to-one.
                 
                - 
                    If $\alpha$ and $\beta$ are one-to-one,
                    then $\beta\circ\alpha$ is one-to-one.
                
 
                - 
                    If $\beta\circ\alpha$ is one-to-one,
                    then $\alpha$ is one-to-one.
                        
                        
                        $\beta$ is not one-to-one iff 
                        $\alpha$ 
                        is not onto.
                 
            
        
        
            
                
                A mapping 
                $\beta:T\rightarrow S$
                is 
                
                    an inverse of
                
                $\alpha:S\rightarrow T$
                if both
                $\beta\circ\alpha=\iota_S$
                and 
                $\alpha\circ\beta=\iota_T.$
                A mapping is
                
                    invertible
                
                if it has an inverse.
            
        
        
            
                
                If a mapping is invertible, then
                its inverse is unique. (Problem 4.13).
            
        
        
            
                
                The mapping $\alpha$
                in 
                 
                is invertible. Its inverse
                is the mapping $\gamma$
                defined by
                $\gamma(1)=y,$
                $\gamma(2)=x,$
                $\gamma(3)=z.$
                For example,
                $(\gamma\circ\alpha)(x)$
                $=\gamma(2)=x$
                $=\iota_S(x),$
                and
                $(\alpha\circ\gamma)(1)$
                $=\alpha(y)=1$
                $=\iota_T(1).$
                There are also four other equations to be checked,
                those involving 
                $(\gamma\circ\alpha)(y),$
                $(\gamma\circ\alpha)(z),$
                $(\alpha\circ\gamma)(2),$
                $(\alpha\circ\gamma)(3).$
                In terms of the diagram in
                ,
                $\gamma$ is obtained by reversing the direction
                of the arrows under $\alpha.$
            
        
        
            
                
                The mapping $\alpha:\R\rightarrow\R$
                defined by $\alpha(x)=x^2$ is not
                invertible. It fails on both counts
                of the following theorem.
            
        
        
            
                
                A mapping is invertible iff it is both one-to-one
                and onto.
            
        
        
            
            Some authors write mappings on the right
            rather than on the left. Our $\alpha(x)$
            becomes, for them, $x\alpha.$ Then in 
            $\beta\circ\alpha$ it is $\beta,$ the mapping
            on the left, that is applied first,
            because $x(\beta\circ\alpha)=(x\beta)\alpha.$