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.

4
  • 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 Commented Dec 11, 2016 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} Commented Dec 11, 2016 at 14:02
  • sry i dont know how to put that it correct format. Commented Dec 11, 2016 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 {}) Commented Dec 11, 2016 at 14:08

1 Answer 1

9

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.