4

Using this I was able to create a big zero but how can I center it? I'm a bit lost on the horizontal space. How can I center the 0_{3 \times 3} in this matrix. My code:

\documentclass{article}
\usepackage{scalerel,amsmath,arydshln}
\author{someone}
\title{something}
\begin{document}
    \maketitle
    \begin{equation}
    \begin{aligned}
    A=\left[\begin{array}{ccc;{1pt/2pt}ccc}
    0&1&0&&&\\
    0&0&1&&&\\
    2&1&-1&\multicolumn{3}{c}{\raisebox{\dimexpr\normalbaselineskip+.3\ht\strutbox+0\height}[0pt][0pt]{\scalebox{2}{$0_{\scaleto{3\times 3}{3pt}}$}}}
    \end{array}\right]
    \end{aligned}
    \end{equation}
\end{document}

Matirx

Is there no easier way to create a matrix like this with some package?

Al_Fh
  • 452

1 Answers1

5
\documentclass{article}
\usepackage{scalerel,amsmath,arydshln}
\author{someone}
\title{something}
\begin{document}
    \maketitle
    \begin{equation}
    \begin{aligned}
    A=\left[\begin{array}{c;{1pt/2pt}c}
        \begin{array}{@{}ccc@{}}
            0&1&0\\
            0&0&1\\
            2&1&-1
        \end{array}&
        \begin{array}{@{}c@{}}
            \scalebox{2}{$0_{\scaleto{3\times 3}{3pt}}$}
        \end{array}
    \end{array}\right]
    \end{aligned}
    \end{equation}
\end{document}

enter image description here

  • Thank you. I've not seen @ being used like this in array. Can you further your explaining of what you have done? – Al_Fh May 05 '19 at 06:41
  • 1
    @Al_Fh @{<a>} will add <a> between the column at the position. Try with @{AlFh}, you will see the difference. I use @{} to remove all space between the text of the columns. See more: https://tex.stackexchange.com/a/207463/156344 –  May 05 '19 at 13:57
  • Thanks for the response, Greatly appreciated – Al_Fh May 05 '19 at 14:28