4

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

5

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

2
\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}
  • @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 May 20 '17 at 12:26

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.