If $\mathrm{A}$ is an $\mathrm{m} \times \mathrm{n}$ matrix and $\mathrm{B}$ is a matrix such that both $\mathrm{A}^{\mathrm{T}} \mathrm{B}$ and $\mathrm{BA}^{\mathrm{T}}$ are defined, then the order of $\mathrm{B}$ is
(a) $m \times n$
(b) $\mathrm{n} \times \mathrm{m}$
(c) $\mathrm{m} \times \mathrm{m}$
(d) $n \times n$