11

I want to explicitly specify dimension of matrices in some expressions, something like

$$\boldsymbol{A}_{m \times n} \boldsymbol{B}_{n \times m} = \boldsymbol{C}_{m \times m} \, .$$

Is there any more or less standard notation for this?


While this notation is generally unambiguous, I think it become ambiguous, for example, in the following case. Suppose that I have some column or row vector which is conjugate transpose of correspondingly row or column vector. If I write it in the following way $$\boldsymbol{A}_{n \times 1}^{\dagger} \, ,$$ we can have 2 different interpretations:

  1. matrix $\boldsymbol{A}_{n \times 1}$ is $n \times 1$ column vector and by $\boldsymbol{A}_{n \times 1}^{\dagger}$ I'm referring to its conjugate transpose which is $1 \times n$ row vector;
  2. matrix $\boldsymbol{A}_{n \times 1}^{\dagger}$ itself is $n \times 1$ column vector which is conjugate transpose of $1 \times n$ row vector $\boldsymbol{A}$.
Wildcat
  • 397

3 Answers3

21

Sometimes your notation is used. The problem of the ambiguity of $X_{m \times n}^T$ comes from the wrong usage. There is no such thing as $X_{m \times n}^T$. Instead, there is $X_{m \times n}$ and there is $X^T$. Combining these two will give you either $(X_{m \times n})^T$ or $(X^T)_{m \times n}$, and removing the parentheses implies that $*_{* \times *}$ and $*^T$ commute (like, for example, $X^{-T} = (X^{-1})^T = (X^T)^{-1}$), which is wrong.

However, I see very little, if any, practical usage in this kind of typesetting. More or less standard way is $X \in \mathbb{R}^{m \times n}$ or $X \in M_{m \times n}(\mathbb{R})$, and then you just use $X$. Writing dimensions in the formulas might make sense at the very beginning of learning this stuff, but not for long, and in this case, parentheses also make a lot of sense.

For anything more advanced, let me give you an example: would you, in a similar fashion, write

$$x_\text{even} + y_\text{odd} = z_\text{odd}?$$

Properties of the objects usually unnecessarily clutter your formulas, and are far better to be declared before the first use, instead of all the time. IMO, of course.

Vedran Šego
  • 11,372
  • I like your initial comments - that makes the most sense to me. – bjd2385 Jul 11 '16 at 08:59
  • This does not work though if $X$ is of mixed type, which is a common problem in statistical inference. – Astrid Nov 13 '17 at 17:33
  • 1
    @Astrid I'm not familiar with statistical inference, but your problems seems to be with specifying the type ($\mathbb{R}$ in my example). If that's the case, just write "Let $X$ be a matrix of order $m \times n$ such that ". The point of my answer is to specify the dimensions once, or maybe a few times, but not every time you use your variable. – Vedran Šego Nov 14 '17 at 12:29
  • @VedranŠego yours is a fair point. Well put. – Astrid Nov 14 '17 at 12:56
4

We've always used $$\boldsymbol{A}\in\boldsymbol{M}_{m\times n}(\mathbb{R})$$ to say that it's a real-valued matrix of size $m\times n$. So I guess a more general form would be $\boldsymbol{A}\in\boldsymbol{M}_{m\times n}(F)$ for a matrix with entries in some field $F$.

Tim
  • 3,349
  • 1
    You probably mean $\mathbf A \in M_{m \times n}(\Bbb R)$ rather than the equality sign. – Lord_Farin Apr 23 '13 at 17:07
  • @Tim And this doesn't really help the OP as he wants the size of the matrix to be explicit in the formulas. – Git Gud Apr 23 '13 at 17:08
  • oops yes, corrected that now, thanks. I didn't realise that was what OP was after, I figured specifying what the matrices were and then simply saying $\boldsymbol{A}\boldsymbol{B}=\boldsymbol{C}$ would have been sufficient. sorry if that wasn't the point though! – Tim Apr 23 '13 at 17:20
  • @Lord_Farin Where have you been? – Pedro Aug 25 '13 at 21:16
2

As requested, the subscript $m \times n$ notation is perfectly common, if not standard.

Of course, we can always use parenthesis to resolve any difficulties. It should be clear that $$\left(A_{m\times n}\right)^T = \left(A^T\right)_{n\times m}.$$

Of course, with a simple operation like the transpose, it looks much nicer as just $A^T$, or, if necessary $\left(A_{m\times n}\right)^T$. The dimensionality of the resulting transpose should be obvious.

Nevertheless, it's not bad practice especially for teaching to remove any possible ambiguities when doing several matrix-matrix or matrix-vector multiplications.

Emily
  • 35,688
  • 6
  • 93
  • 141
  • What I remember is that at least for old fortran-programmers row and cols-indexes are exchanged: the first index indicates the column. I think I've seen this elsewhere too. Also I'd love it if it would become common to use the letters r for the r ows and c for the c olumns, just n,m or j,k et al are used for everything else - and r,c would make it unambiguous immediately... – Gottfried Helms Aug 26 '13 at 16:13