1

Does anybody know how I can get these symbols for a diagonal matrix in Latex?

enter image description here

1
  • Welcome to TeX.SE.
    – Mico
    Commented Nov 22, 2021 at 13:16

1 Answer 1

3

I am sure there must be a better way, but you can combine a rotated rule with the brackets and a few hspaces and get kind of close. Note this won't scale vertically so don't try to put fractions (or something else tall) between the brackets. The expression with normal brackets is shown as well for comparison.

\documentclass{article}
\usepackage{rotating}
\newcommand\diagmatrix[1]{[\hspace{-1.6pt}\raisebox{7pt}{\rotatebox{-30}{\rule{1mm}{.15mm}}}\hspace{-1pt}#1\hspace{-1pt}\raisebox{-1pt}{\rotatebox{-30}{\rule{1mm}{.15mm}}}\hspace{-1.6pt}]}
\begin{document}
\[\diagmatrix{m_r}^{-1}\diagmatrix{k_r}\]
\[[m_r]^{-1}[k_r]\]
\end{document}

enter image description here

You must log in to answer this question.

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