8

I want to typeset a large matrix:

enter image description here

\addtocounter{MaxMatrixCols}{8}
\begin{pmatrix}
1\\
 &\ddots\\
 &      &1\\
 &      & &0& &      & &1& &      &\\
 &      & & &1&      & & & &      &\\
 &      & & & &\ddots& & & &      &\\
 &      & & & &      &1& & &      &\\
 &      & &1& &      & &0& &      &\\
 &      & & & &      & & &1&      &\\
 &      & & & &      & & & &\ddots&\\
 &      & & & &      & & & &      &1
\end{pmatrix}

I had to change the \arraycolsep so as to fit for paper width:

\setlength\arraycolsep{3pt}

and then the \ddots in the matrix look a bit ugly:

enter image description here

So I changed the \arraystretch

\renewcommand\arraystretch{0.8}

the dots all are too low and has not a conspicuous improvement:

enter image description here

6

You could use commands of the graphicx package for rotating and raising the dots, such as \rotatebox and \raisebox. Define a macro for it, preferably also macros for the value. So you could easily adjust it if necessary.

\documentclass{article}
\usepackage{amsmath}
\setlength\arraycolsep{3pt}
\usepackage{graphicx}
\newcommand{\dotsangle}{-12}
\newcommand{\dotsxshift}{.2ex}
\newcommand{\dotsyshift}{1ex}
\newcommand{\rdots}{\hspace{\dotsxshift}%
    \raisebox{\dotsyshift}{\rotatebox{\dotsangle}{$\ddots$}}}
 \begin{document}
\addtocounter{MaxMatrixCols}{8}
\[
\begin{pmatrix}
1\\
 &\rdots\\
 &      &1\\
 &      & &0& &      & &1& &      &\\
 &      & & &1&      & & & &      &\\
 &      & & & &\rdots& & & &      &\\
 &      & & & &      &1& & &      &\\
 &      & &1& &      & &0& &      &\\
 &      & & & &      & & &1&      &\\
 &      & & & &      & & & &\rdots&\\
 &      & & & &      & & & &      &1
\end{pmatrix}
\]
\end{document}

matrix

0

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.