Function composition of linear functions from the real numbers to the real numbers is almost always noncommutative. For example, let f ( x ) = 2 x + 1 and g ( x ) = 3 x + 7 . Then ( f ∘ ∘ g ) ( x ) = f ( g ( x ) ) = 2 ( 3 x + 7 ) + 1 = 6 x + 15 and ( g ∘ ∘ f ) ( x ) = g ( f ( x ) ) = 3 ( 2 x + 1 ) + 7 = 6 x + 10 This also applies more generally for linear and affine transformations from a vector space to itself (see below for the Matrix representation).