3

please help

Please help me to produce this matrix with LaTeX. I tried this:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mleftright}

\begin{document}

[
 \renewcommand\arraystretch{1.3}
 \mleft[
    \begin{array}{c|c|c|c}
    \ 0 2 2 \dots 2 \\
    202\dots2 \\
    \\
    \\
    \\
    222 \dots 0 & 111 & \dots & 11 \\ \hline
    \ 111\dots 1 \\
    111\dots 1 \\
    111 \dots 1 & 022 \ & \dots & 11 \\
    \end{array}
 \mright]
]
\end{document}

But it doesn't come out exactly right.

  • 1
    Could you show us what you've tried? It would really make things easier for us, as we wouldn't have to build it all up from scratch. This can only help you get your answer sooner and will likely make people more willing to help, as they can see you've put in some effort and aren't taking them for granted – Au101 Dec 11 '16 at 13:56
  • \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \begin{document} [ \renewcommand\arraystretch{1.3} \mleft[ \begin{array}{c|c|c|c} \ 0 2 2 \dots 2 \\202\dots2 \\ \\ \\ \\ 222 \dots 0 & 111 & \dots & 11 \\ \hline \ 111\dots 1 \\111\dots 1 \\ 111 \dots 1 & 022 \ & \dots & 11 \\ \end{array} \mright] ] \end{document} – Logistics Dec 11 '16 at 14:02
  • sry i dont know how to put that it correct format. – Logistics Dec 11 '16 at 14:05
  • No worries, rather than adding it as a comment, next time, edit the question to include it there. Simply paste it in, highlight it, and hit ctrl+k, or press the code sample button (that one that looks like {}) – Au101 Dec 11 '16 at 14:08
8

Like this?

\documentclass{article}

\usepackage{amsmath}
 \usepackage{mleftright}
\usepackage{array, multirow}
\usepackage[svgnames, table]{xcolor}

\begin{document}

\[
 \renewcommand\arraystretch{1.3}
\arrayrulecolor{Silver!80}
 \mleft[
    \begin{array}{*{5}{c}|ccc|c|cc}
    0 & 2 & 2 & \dots & 2 & 1 & 1 & 1 & \multirow{4}{*}[-1ex]{\dots }& 1 & 1\\
    2 & 0 & 2 & \dots & 2 & 1 & 1 & 1 & & 1 & 1 \\
    \vdots & & & & & & & & & & \vdots\\
    2 & 2 & 2 & \dots & 0 & 1 & 1 & 1 & & 1 & 1 \\ \hline
    1 & 1 & 1 & \dots & 1& 0 & 2 & 2 & & 1 & 1 \\
    1 & 1 & 1 & \dots & 1& 2 & 0 & 2 & \dots & 1 & 1 \\
    1 & 1 & 1 & \dots & 1& 2 & 2 & 0 && 1 & 1 \end{array}
 \mright]
\]

\end{document} 

enter image description here

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.