You are here
Homeconcatenation
Primary tabs
concatenation
Concatenation on Words
Let $a,b$ be two words. Loosely speaking, the concatenation, or juxtaposition of $a$ and $b$ is the word of the form $ab$. In order to define this rigorously, let us first do a little review of what words are.
Let $\Sigma$ be a set whose elements we call letters (we also call $\Sigma$ an alphabet). A (finite) word or a string on $\Sigma$ is a partial function $w:\mathbb{N}\to\Sigma$, (where $\mathbb{N}$ is the set of natural numbers), such that, if $\operatorname{dom}(w)\neq\varnothing$, then there is an $n\in\mathbb{N}$ such that
$w\textrm{ is }\left\{\begin{array}[]{ll}\textrm{defined for every }m\leq n,\\ \textrm{undefined otherwise.}\end{array}\right.$ 
This $n$ is necessarily unique, and is called the length of the word $w$. The length of a word $w$ is usually denoted by $w$. The word whose domain is $\varnothing$, the empty set, is called the empty word, and is denoted by $\lambda$. It is easy to see that $\lambda=0$. Any element in the range of $w$ has the form $w(i)$, but it is more commonly written $w_{i}$. If a word $w$ is not the empty word, then we may write it as $w_{1}w_{2}\cdots w_{n}$, where $n=w$. The collection of all words on $\Sigma$ is denoted $\Sigma^{*}$ (the asterisk ${}^{*}$ is commonly known as the Kleene star operation of a set). Using the definition above, we see that $\lambda\in\Sigma^{*}$.
Now we define a binary operation $\circ$ on $\Sigma^{*}$, called the concatenation on the alphabet $\Sigma$, as follows: let $v,w\in\Sigma^{*}$ with $m=v$ and $n=w$. Then $\circ(v,w)$ is the partial function whose domain is the set $\{1,\ldots,m,m+1,\ldots,m+n\}$, such that
$\circ(v,w)(i)=\left\{\begin{array}[]{ll}v(i)&\textrm{if }i\leq m\\ w(im)&\textrm{otherwise.}\end{array}\right.$ 
The partial function $\circ(v,w)$ is written $v\circ w$, or simply $vw$, when it does not cause any confusion. Therefore, if $v=v_{1}\cdots v_{m}$ and $w=w_{1}\cdots w_{n}$, then $vw=v_{1}\cdots v_{m}w_{1}\cdots w_{n}$.
Below are some simple properties of $\circ$ on words:

$\circ$ is associative: $(uv)w=u(vw)$.

$\lambda w=w\lambda=w$.

As a result, $\Sigma^{*}$ together with $\circ$ is a monoid.

$vw=\lambda$ iff $v=w=\lambda$.

As a result, $\Sigma^{*}$ is never a group unless $\Sigma^{*}=\{\lambda\}$.

If $a=bc$ where $a$ is a letter, then one of $b,c$ is $a$, and the other the empty word $\lambda$.

If $ab=cd$ where $a,b,c,d$ are letters, then $a=c$ and $b=d$.
Concatenation on Languages
The concatenation operation $\circ$ over an alphabet $\Sigma$ can be extended to operations on languages over $\Sigma$. Suppose $A,B$ are two languages over $\Sigma$, we define
$A\circ B:=\{u\circ v\mid u\in A,v\in B\}.$ 
When there is no confusion, we write $AB$ for $A\circ B$.
Below are some simple properties of $\circ$ on languages:

$(AB)C=A(BC)$; i.e., concatenation of sets of letters is associative.

Because of the associativity of $\circ$, we can inductively define $A^{n}$ for any positive integer $n$, as $A^{1}=A$, and $A^{{n+1}}=A^{n}A$.

It is not hard to see that $\Sigma^{*}=\{\lambda\}\cup\Sigma\cup\Sigma^{2}\cup\cdots\cup\Sigma^{n}\cup\cdots$.
Remark. A formal language containing the empty word, and is closed under concatenation is said to be monoidal, since it has the structure of a monoid.
References
 1 H.R. Lewis, C.H. Papadimitriou Elements of the Theory of Computation. PrenticeHall, Englewood Cliffs, New Jersey (1981).
Mathematics Subject Classification
20M35 no label found68Q70 no label found Forums
 Planetary Bugs
 HS/Secondary
 University/Tertiary
 Graduate/Advanced
 Industry/Practice
 Research Topics
 LaTeX help
 Math Comptetitions
 Math History
 Math Humor
 PlanetMath Comments
 PlanetMath System Updates and News
 PlanetMath help
 PlanetMath.ORG
 Strategic Communications Development
 The Math Pub
 Testing messages (ignore)
 Other useful stuff
 Corrections