64

Say we have two finite sequences $X = (x_0,...,x_n)$ and $Y = (y_0,...,y_n)$. Is there a more or less common notation for the concatenation of these sequences, like $\sum (X,Y) = (x_0,...,x_n,y_0,...,y_n)$?

joriki
  • 242,601
chtenb
  • 1,491

8 Answers8

58

The comments suggest the following notations for the concatenation of $X$ and $Y$:

  • $X^\frown Y$ (given by X^\frown Y);
  • $XY$ (given by XY);
  • $X \cdot Y$ (given by X \cdot Y);
  • $X \mathbin\Vert Y$ (given by X \mathbin\Vert Y);

of which the first seems not to be in use for other concepts, making it especially suitable.

forest
  • 105
Lord_Farin
  • 17,924
  • 9
  • 52
  • 132
  • 3
    What about concatenation from i=1 to N vectors? – Pedro77 Apr 06 '18 at 22:02
  • 7
    @Pedro77 How about $\big\Vert_{i=1}^N v_i = v_1 \Vert \dots \Vert v_N$? – user76284 Jul 19 '18 at 21:13
  • 1
    I would personally definitely avoid $X\cdot Y$, as that easily can be misinterpreted as the dot product. But hey, maybe it's obvious what is meant given the context. – HelloGoodbye Oct 10 '20 at 21:43
  • 5
    This answer sums up pretty well my problem with mathematical formalism. Even the most ridiculously trivial things are hard to find a clear answer to. – Johan Nov 04 '20 at 10:11
  • @Johan: That is why I began to define the heck out of everything, including notation, in my publications. – Make42 Sep 19 '21 at 14:09
  • I found X {}^\frown Y to look nicer when the variables may have subscripts, compare $X_1^\frown X_2$ with $X_1 {}^\frown X_2$ (maybe there is a neater way to achieve this though?) – Miriam Jun 03 '25 at 01:15
20

The same question on Tex SE.

From there, and more:

  • $X \oplus Y$ (given by X \oplus Y);
  • $(X,Y)$ (given by (X,Y));

I would avoid $X \times Y$, $XY$ or $X \cdot Y$ to not confuse it with any sort of multiplication / product.

And I would also not use $X \otimes Y$ because it is usually the tensor product. (See also here.)

Some relevant Wikipedia pages with common notations:

Albert
  • 503
16

$\newcommand\mdoubleplus{\mathbin{+\mkern-10mu+}}$ In haskell the $ \mdoubleplus $ operator is used for concatenating lists.

You can define it in latex using the command

\newcommand\mdoubleplus{\mathbin{+\mkern-10mu+}}
chtenb
  • 1,491
11

Computer science often uses the ⧺ (U+29FA) symbol for concatenation.

This is \doubleplus in the LaTeX package unicode-math (which requires a modern engine that supports Unicode), as well as the legacy packages stix and stix2. Or, in the modern toolchain, you can use the Unicode symbol in your source.

Davislor
  • 2,636
5

If $x$ and $y$ are finite sequences, you could denote their concatenation by $xy$. Let me explain. There's at least two ways of formalizing the statement "$x$ and $y$ are finite sequences in $X$"

  • $x$ and $y$ are functions of type $[\:\!n) \rightarrow X$, where $[\:\!n)$ is a shorthand for the set $\{0,\ldots,n-1\}$.

  • $x$ and $y$ are elements of $X^*$, where $X^*$ is the monoid freely generated by $X$.

If you're interested in concatenating these things, then you should probably take the second perspective, in which case the concatenation of $x$ and $y$ is simply their product in the monoid $X^*$, which is denoted $xy$.

goblin GONE
  • 69,385
4

In formal specifications, one way to concatenate two sequences is using the Haskell concatenation symbol as indicated in one of the comments above. In a $\mathrm\TeX$ editor one can type the following: X +\!\!\!+ Y. The result appears like this, $X+\!\!\!+Y$.

3

Starting with your defined sequences $X = (x_0, \ldots, x_n)$ and $Y=(y_0,\ldots,y_n)$, you can use the commonly accepted tuple/ordered pair notation: \begin{align} (X,Y) &= \left( \left(x_0,\ldots,x_n\right), \left(y_0,\ldots,y_n\right) \right) \\ &= \left(x_0,\ldots,x_n,y_0,\ldots,y_n\right) \end{align}

  • Can you please explain reasoning for downvote; I'd like the opportunity to learn from my mistake. – Daedalus Feb 01 '21 at 23:58
  • The question is asking for a "symbol" which is basically just a single character, not a notation as in your answer. – SMMH Jun 08 '21 at 06:07
  • 3
    A tuple of two sequences is something different than a single sequence (after concatenation). – Make42 Sep 19 '21 at 14:10
1

First of all, the $\frown$ (like the $\smile$) are used in algebraic topology for the cap (cup) product, so there is another use for this symbol. I haven't seen $\uplus$ suggested and I have searched extensively to find an existing use without success. It seems especially suited because sequences are in fact index-ordered sets which can contain duplicate elements. Concatenation is the union of such sets which preserves the order of concatenation and allows duplicates.