8

I was going to write the dimension of a matrix on its outside corner something like this picture. However, I don't know how to do this. I would be grateful if someone could help me.enter image description here

0

2 Answers 2

9

You could use the bmatrix environment from the amsmath package, which supports the subscripts

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 2 & 0 & 0\\
0 & 0 & \ddots & 0\\
0 & 0 & 0 & n
\end{bmatrix}_{n\times n}
\]
\end{document}

which gives:

enter image description here

I think it might be better extending the ellipsis, to give the sense of the replication for all of the columns:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 2 & 0 & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & n
\end{bmatrix}_{n\times n}
\]
\end{document}

enter image description here

0
4
\documentclass{article}
\usepackage{amsmath} 
\begin{document}

\begin{equation}
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 2 & 0 & 0 \\
0 & 0 & \ddots & 0 \\
0 & 0 & 0 & n \\
\end{bmatrix}_{n\times n}
\end{equation}

\end{document}
1
  • @Hamed Do not leave thank you comments; consider upvoting the answers (and, later on accept the one that works for you). Upvoting is the TeX.SE way to say thank you, and accepting answers is good for future reference!
    – Moriambar
    Commented May 20, 2017 at 12:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .