Associative Property - Examples

Examples

Some examples of associative operations include the following.

  • The concatenation of the three strings "hello", " ", "world" can be computed by concatenating the first two strings (giving "hello ") and appending the third string ("world"), or by joining the second and third string (giving " world") and concatenating the first string ("hello") with the result. The two methods produce the same result; string concatenation is associative (but not commutative).
  • In arithmetic, addition and multiplication of real numbers are associative; i.e.,

\left.
\begin{matrix}
(x+y)+z=x+(y+z)=x+y+z\quad
\\
(x\,y)z=x(y\,z)=x\,y\,z\qquad\qquad\qquad\quad\ \ \,
\end{matrix}
\right\}
\mbox{for all }x,y,z\in\mathbb{R}.
Because of associativity, the grouping parentheses can be omitted without ambiguity.
  • Addition and multiplication of complex numbers and quaternions is associative. Addition of octonions is also associative, but multiplication of octonions is non-associative.
  • The greatest common divisor and least common multiple functions act associatively.

\left.
\begin{matrix}
\operatorname{gcd}(\operatorname{gcd}(x,y),z)=
\operatorname{gcd}(x,\operatorname{gcd}(y,z))=
\operatorname{gcd}(x,y,z)\ \quad
\\
\operatorname{lcm}(\operatorname{lcm}(x,y),z)=
\operatorname{lcm}(x,\operatorname{lcm}(y,z))=
\operatorname{lcm}(x,y,z)\quad
\end{matrix}
\right\}\mbox{ for all }x,y,z\in\mathbb{Z}.
  • Taking the intersection or the union of sets:

\left.
\begin{matrix}
(A\cap B)\cap C=A\cap(B\cap C)=A\cap B\cap C\quad
\\
(A\cup B)\cup C=A\cup(B\cup C)=A\cup B\cup C\quad
\end{matrix}
\right\}\mbox{for all sets }A,B,C.
  • If M is some set and S denotes the set of all functions from M to M, then the operation of functional composition on S is associative:
  • Slightly more generally, given four sets M, N, P and Q, with h: M to N, g: N to P, and f: P to Q, then
as before. In short, composition of maps is always associative.
  • Consider a set with three elements, A, B, and C. The following operation:
× A B C
A A A A
B A B C
C A A A
is associative. Thus, for example, A(BC)=(AB)C. This mapping is not commutative.
  • Because matrices represent linear transformation functions, with matrix multiplication representing functional composition, one can immediately conclude that matrix multiplication is associative.

Read more about this topic:  Associative Property

Famous quotes containing the word examples:

    There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring ‘em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.
    Bernard Mandeville (1670–1733)

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)