[Tex/LaTex] How to create the following diagonal matrix in Latex

matrices

enter image description here

I want to write the above matrix in Latex. Please help.

Best Answer

You can get it by using the pmatrix environment and \dots commands of the mathtools package.

\documentclass{article}

\usepackage{mathtools} 

\begin{document}

\[
  \begin{pmatrix}
    a & 0 & \dots & 0 \\
    0 & 1 & \dots & 0 \\
    \vdots & \vdots & \ddots & \vdots \\
    0 & 0 & \dots & 1
  \end{pmatrix}
\]

\end{document}

Here is the output:

enter image description here

Related Question