1

enter image description here

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

5

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

  • 1
    accurate code, but all the dots commands are actually in the basic latex set. pmatrix is in amsmath. nonetheless, loading mathtools is probably the best way to go -- it loads amsmath, so it's a "one stop shop". – barbara beeton Apr 7 '18 at 13:18
1

Using mtpro2 version [lite] you can have a best aestetical bracket parens.

enter image description here

\documentclass[12pt]{article}
\usepackage{times} % Use the Times font for headings
\usepackage[lite]{mtpro2} 
\usepackage{mathtools}


\begin{document}
\[
  \PARENS{\begin{matrix}
    a & 0 & \dots & 0 \\
    0 & 1 & \dots & 0 \\
    \vdots & \vdots & \ddots & \vdots \\
    0 & 0 & \dots & 1
  \end{matrix}}
\]

\end{document}

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.