I work with a square block matrix $ \mathrm{A} $ of different size blocks over a field $ \mathbb{K} $ and I would like to formally write the set it belongs to.
Because $ \mathrm{A} $ has different size blocks, I do not think typical notations like $ \alpha, m, n \in \mathbb{N}_1, \mathrm{A} \in \mathcal{M}_{\alpha m \times \alpha n} (\mathbb{K}) $ can work.
I came up with
\begin{equation} n_1, n_2 \in \mathbb{N}_1, n := (n_1, n_2), \\ \alpha \in \mathbb{N}_1, \mathrm{A} \in \mathcal{M}_{\alpha} \left( \bigcup \mathcal{M}_{n \times n} (\mathbb{K}) \right). \end{equation}
But I am not sure that the ring I built cover all the necessary matrix blocks, meaning:
\begin{equation} \bigcup \mathcal{M}_{n \times n} (\mathbb{K}) = \mathcal{M}_{n_1} (\mathbb{K}) \cup \mathcal{M}_{n_2} (\mathbb{K}) \cup \mathcal{M}_{n_1 \times n_2} (\mathbb{K}) \cup \mathcal{M}_{n_2 \times n_1} (\mathbb{K}). \end{equation}
Also, if my notation is correct, would it make sense to write
\begin{equation} \lambda \in \mathbb{K}, \mathrm{B} := \lambda \mathrm{A}, \end{equation}
even if $ \mathrm{A} $ is defined over the ring $ \bigcup \mathcal{M}_{n \times n} (\mathbb{K}) $ and not directly over the field $ \mathbb{K} $ the scalar $ \lambda $ belongs to?
I am not from a pure math background so I am sorry in advance if I wrote outrageous things. I am trying to be more mathematically rigorous during my PhD in applied math.
Thanks.
If you're trying to give a notation to the ring/algebra of all block matrices with a prescribed set of block sizes, a union does not achieve that; assuming each member of the union is in block form (which isn't really indicated in your notation as-is), the union only consists of matrices with one block nonzero and everything else zeroed out.
If the exact structure of the block matrices isn't of material consequence, you can refer to a product of matrix algebras $$\prod_{k=1}^N M_{n_k \times n_k}(\mathbb K),$$ as one would frequently do in representation theory for semisimple algebras. The block matrix structure then becomes a (fairly canonical) representation of that product of algebras. See e.g. here, albeit that page uses direct sum instead of product, which is fine on a set theoretic level, but it's not a direct sum in the category of algebras; you probably won't get in trouble for writing direct sum if your paper doesn't claim to be rigorous category theory.
If the precise block matrix structure is important, it's probably best to draw explicit matrices with blocks indicated (likely making generous use of $\ldots$, $\ddots$, $\vdots$.).