TransWikia.com

Angle of ddots in an uneven matrix

TeX - LaTeX Asked by user2653422 on December 18, 2020

I have the following triangle matrix with zeroes on the diagonal

documentclass[a4paper]{memoir}
usepackage{amsmath}
begin{document}
[
M = begin{pmatrix}
    0 & a_{1,2} & a_{1,3}   & dots     & a_{1,n}   
      & 0       & a_{2,3}   & dots     & a_{2,n}   
      &         & 0         & ddots    & vdots    
      &         &           &           & 0
  end{pmatrix}
]
end{document}

The small problem I have now, is that the dots from ddots point from a_{2,3} to the last zero. This could lead to the impression that the diagonal is not given by the zeroes. Anyone an idea?

2 Answers

How about this

documentclass[a4paper]{memoir}
usepackage{amsmath}
begin{document}
[
M = begin{pmatrix}
    0 & a_{1,2} & a_{1,3}   & dots     & a_{1,n}   
      & 0       & a_{2,3}   & dots     & a_{2,n}   
      &         & 0         & ddots    & vdots    
      &         &           &     0      & a_{n-1,n}   
      &         &           &           & 0
  end{pmatrix}
]
end{document}

enter image description here

BTW: please post small compilable docs instead of sniplets. The less others have to add the more likely it is to get help.

Correct answer by daleif on December 18, 2020

With nicematrix:

documentclass[a4paper]{memoir}
usepackage{amsmath}
usepackage{nicematrix}
begin{document}
[
renewcommand{arraystretch}{1.3}
M = begin{pNiceArray}{ccwc{4mm}wc{7mm}wc{7mm}}[xdots/shorten=1mm]
    0 & a_{1,2} & a_{1,3}   & Cdots     & a_{1,n}   
      & 0       & a_{2,3}   & Cdots    & a_{2,n}   
      &         & Ddots    & Ddots    & Vdots    
      &         &           & 0         & a_{n-1,n}   
      &         &           &           & 0
  end{pNiceArray}
]
end{document}

Output of the above code

Answered by F. Pantigny on December 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP