# Golay code G_{24} generator matrix problem

I have some difficulties with writing this matrix, can somebody help me out?,

• What have you tried so far? (due to the lines you will need to use the array env) Aug 2 at 10:24
• I was thinking about using tikz package, but i have never used it before and it was hard to make it look like a matrix, not just a simple table. I also found a similar question ( tex.stackexchange.com/questions/312513/creating-a-weird-matrix ), but had no idea how to make it work for me Aug 2 at 10:36
• Then the nicematrix package is something you need to take a look at. Aug 2 at 10:42
• Ok, thanks a lot. I will take a break and have a look at it! Aug 2 at 10:44

Like this?

\documentclass{article}

\usepackage{amsmath, amssymb}
\usepackage{mathabx}

\begin{document}

$\left(\begin{array}{*{5}{c}|c} 1 & 1 & \dots & 1 & 1 & 0 \\ \hline & & & & & 0 \\ & & I_{11} & & & \vdots \\ & & & & & 0 \\ \hline 0 & 0 & \dots & 0 & 0 & 1 \\ \hline & & & & & 1 \\ & & \mkern2mu\overline{\mkern-2muQ}_{11} & & & \vdots \\ & & & & & 1 \end{array}\right) \in\mathfrak{M}^{12}_{24}$%

\end{document} [![enter image description here][1]][1]


With {pNiceArray} of nicematrix.

\documentclass{article}
\usepackage{nicematrix}
\usepackage{amsfonts} % for \mathfrak

\begin{document}

$\begin{pNiceArray}{ccccc|c}[margin,xdots/shorten=4pt] 1 & 1 & \Cdots & 1 & 1 & 0 \\ \hline \Block{3-5}{I_{11}} & & & & & 0 \\ & & & & & \Vdots \\ & & & & & 0 \\ \hline 0 & 0 & \Cdots & 0 & 0 & 1 \\ \hline \ \Block{3-5}{\overline Q_{11}} & & & & & 1 \\ & & & & & \Vdots \\ & & & & & 1 \end{pNiceArray} \in \mathfrak{M}_{24}^{12}(Z_2)$

\end{document}


You can accomplish this by using the array environment and placing \hlines where necessary. The second, fourth, sixth and eigth row may look a bit strange at first, but they really are just empty array entries. Similarily, the third and fifth row are just I_{11} and Q_{11} with two empty array entries on either side.

Enclose it in \left( and \right) to make it look like a matrix.

You will also need the amsfonts package for the Fraktur M if you haven't loaded it already.

$G_{24} := \left( \begin{array}{ccccc|c} % vertical line between fifth and sixth column 1 & 1 & \dots & 1 & 1 & 0\\ \hline & & & & & 0\\ & & I_{11} & & & \vdots\\ & & & & & 0\\ \hline 0 & 0 & \dots & 0 & 0 & 1\\ \hline & & & & & 1\\ & & \overline Q_{11} & & & \vdots\\ & & & & & 1\\ \end{array} \right) \in \mathfrak{M}^{12}_{24}(Z_2)$