\documentclass{article}

\usepackage[a4paper, margin=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{xcolor}

\definecolor{darkgreen}{rgb}{0.0, 0.45, 0.0}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.8}

\begin{document}

Matrix for Exercise 1.1:
\begin{center}
	\begin{tabular}{l||ccc|ccc|ccc|ccc}
		&  & \color{darkblue} E&  &  & \color{darkblue} F&  &  & \color{darkblue} G&  &  & \color{darkblue} H&  \\\hline\hline
		&  &  & \color{darkblue} 7&  &  & \color{darkblue} 8&  &  & \color{darkblue} 2&  &  & \color{darkblue} 9\\
		\color{darkgreen} A &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 4&  &  &\color{darkgreen} 5&  &  &\color{darkgreen} 9&  &  &\color{darkgreen} 4 &  &  \\\hline
		&  &  & \color{darkblue} 8&  &  & \color{darkblue} 4&  &  & \color{darkblue} 1&  &  & \color{darkblue} 5\\
		\color{darkgreen} B &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 6&  &  &\color{darkgreen} 6&  &  &\color{darkgreen} 8&  &  &\color{darkgreen} 3 &  &  \\\hline
		&  &  & \color{darkblue} 3&  &  & \color{darkblue} 7&  &  & \color{darkblue} 5&  &  & \color{darkblue} 3\\
		\color{darkgreen} C &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 3&  &  &\color{darkgreen} 5&  &  &\color{darkgreen} 4&  &  &\color{darkgreen} 1 &  &  \\\hline
		&  &  & \color{darkblue} 6&  &  & \color{darkblue} 6&  &  & \color{darkblue} 4&  &  & \color{darkblue} 9\\
		\color{darkgreen} D &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 5&  &  &\color{darkgreen} 5&  &  &\color{darkgreen} 7&  &  &\color{darkgreen} 8 &  &
	\end{tabular}
\end{center}

Matrix for Exercise 1.2:
\begin{center}
	\begin{tabular}{l||ccc|ccc|ccc|ccc}
		&  & \color{darkblue} W&  &  & \color{darkblue} X&  &  & \color{darkblue} Y&  &  & \color{darkblue} Z&  \\\hline\hline
		&  &  & \color{darkblue} 1&  &  & \color{darkblue} 1&  &  & \color{darkblue} 2&  &  & \color{darkblue} 2\\
		\color{darkgreen} A &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 3&  &  &\color{darkgreen} 9&  &  &\color{darkgreen} 5&  &  &\color{darkgreen} 6 &  &  \\\hline
		&  &  & \color{darkblue} 2&  &  & \color{darkblue} 5&  &  & \color{darkblue} 3&  &  & \color{darkblue} 7\\
		\color{darkgreen} B &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 5&  &  &\color{darkgreen} 4&  &  &\color{darkgreen} 2&  &  &\color{darkgreen} 9 &  &  \\\hline
		&  &  & \color{darkblue} 7&  &  & \color{darkblue} 9&  &  & \color{darkblue} 5&  &  & \color{darkblue} 6\\
		\color{darkgreen} C &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 2&  &  &\color{darkgreen} 7&  &  &\color{darkgreen} 9&  &  &\color{darkgreen} 1 &  &  \\\hline
		&  &  & \color{darkblue} 7&  &  & \color{darkblue} 6&  &  & \color{darkblue} 5&  &  & \color{darkblue} 8\\
		\color{darkgreen} D &  &  &  &  &  &  &  &  &  &  &  & \\
		& \color{darkgreen} 2&  &  &\color{darkgreen} 8&  &  &\color{darkgreen} 3&  &  &\color{darkgreen} 4 &  &
	\end{tabular}
\end{center}

\end{document}
