# Notation for juxtaposition operation on matrices

Does there exist a fairly standard notation for horizontal and vertical juxtaposition operations on matrices? (Vertical juxatposition can be called "stacking.")

For example, juxtaposing horizontally a matrix of the size $m\times n_1$ with a matrix of the size $m\times n_2$, one obtains a matrix of the size $m\times(n_1 + n_2)$. Stacking vertically a matrix $m_1\times n$ with a matrix $m_2\times n$, one obtains a matrix $(m_1 + m_2)\times n$.

I've seen the notation $$A = [a_1|a_2|\dotsb|a_n]$$ for a matrix $A$ with columns $a_1,a_2,\dotsc,a_n$. It looks a bit ad hoc, unless we define $|$ as the horizontal juxtaposition operation that can be applied to any pair of matrices with the same number of rows. A notation for vertical juxtaposition is also needed.

Such notation would be quite useful for writing matrices defined by blocks or decomposing matrices into blocks (into rows or columns in particular).

## 1 Answer

Just draw a matrix of matrices:

$$M=\begin{pmatrix}A&B\\C&D\end{pmatrix}$$

• This would be a matrix of matrices $2\times 2$, not a matrix with $4$ blocks. – Alexey Mar 20 '17 at 13:07
• I would like to have an explicit notation (which could be used with a computer algebra system, for example), not a notation that needs to be accompanied with oral explanation or text in parentheses. – Alexey Mar 20 '17 at 13:12
• So you're saying a $2\times 2$ matrix whose entries are $n\times n$ matrices is different from a $2n\times 2n$ matrix? I suppose you could say that one is a linear endomorphism on $R^n\oplus R^n$ whereas the other is a linear endomorphism on $R^{2n}$. But these two things are so clearly isomorphic that no one will be confused, even without an accompanying explanation. – Oscar Cunningham Mar 20 '17 at 13:22
• For what it's worth, octave (and I presume MATLAB) thinks that "A=[1 2; 3 4]; B=[A A; A A]" is valid code which gives the answer you'd expect. – Oscar Cunningham Mar 20 '17 at 13:24