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}$.
  • 6
    $\begingroup$ In my first linear algebra course, I was taught the notation you just used. It's good enough for me. $\endgroup$ – Git Gud Apr 23 '13 at 16:55
  • $\begingroup$ I don't think that the notation is standard, but I'd say it's certainly unambiguous. I've seen it before in a few places, but I don't know if it's a standardized nomenclature. $\endgroup$ – Emily Apr 23 '13 at 17:38
  • $\begingroup$ @Arkamis This notation can be ambiguous. I've updated my question to show a specific example when this is the case. $\endgroup$ – Wildcat Apr 23 '13 at 18:17
  • 2
    $\begingroup$ That's why we use parentheses! $(A_{m\times n})^T$ $\endgroup$ – Emily Apr 23 '13 at 18:30
  • 1
    $\begingroup$ $(A^H)_{n\times m}$ $\endgroup$ – Emily Apr 23 '13 at 18:57

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.

  • $\begingroup$ I like your initial comments - that makes the most sense to me. $\endgroup$ – jm324354 Jul 11 '16 at 8:59
  • $\begingroup$ This does not work though if $X$ is of mixed type, which is a common problem in statistical inference. $\endgroup$ – Astrid Nov 13 '17 at 17:33
  • $\begingroup$ @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 <however you define elements in that case>". The point of my answer is to specify the dimensions once, or maybe a few times, but not every time you use your variable. $\endgroup$ – Vedran Šego Nov 14 '17 at 12:29
  • $\begingroup$ @VedranŠego yours is a fair point. Well put. $\endgroup$ – Astrid Nov 14 '17 at 12:56

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.

  • $\begingroup$ 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... $\endgroup$ – Gottfried Helms Aug 26 '13 at 16:13

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$.

  • 1
    $\begingroup$ You probably mean $\mathbf A \in M_{m \times n}(\Bbb R)$ rather than the equality sign. $\endgroup$ – Lord_Farin Apr 23 '13 at 17:07
  • $\begingroup$ @Tim And this doesn't really help the OP as he wants the size of the matrix to be explicit in the formulas. $\endgroup$ – Git Gud Apr 23 '13 at 17:08
  • $\begingroup$ 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! $\endgroup$ – Tim Apr 23 '13 at 17:20
  • $\begingroup$ @Lord_Farin Where have you been? $\endgroup$ – Pedro Tamaroff Aug 25 '13 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.