I want to typeset a large matrix that represents a generalized case of something. I have difficulty doing the following:
- Typing a set of letters near columns and rows that identify them
- The matrix is too big so it cannot be centered to the middle of the text. I would like to temporarily increase the margins so that the matrix can be align horizontally to the center
- If possible, I would like
Zorig
to go exactly to the middle of the empty area in the matrix - Increase the display size of all elements in the matrix
- It is a good if the dots are more uniformly distributed between the elements they separate
What I get:
What I am (roughly) looking for:
And my source code:
\documentclass[11pt, a4paper]{book}
\usepackage{amsmath}
\usepackage{amssymb, amsfonts}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{makecell}
\begin{document}
\begin{equation}
%
\begin{aligned}
%
\left[
\begin{array}{c c c c c c c c c !{\vrule width 0.25mm}c}
& & & & & Z_{1k} & \dotsm & Z_{1p} & \dotsm & Z_{1k} - Z_{1p} \\
& & \scalebox{3}{$Z_{orig}$} & & & \vdots & & \vdots & & \vdots \\
& & & & & Z_{lk} & \dotsm & Z_{lp} & \dotsm & Z_{lk} - Z_{lp} \\
& & & & & \vdots & & \vdots & & \vdots \\
Z_{k1} & \dotsm & \dotsm & Z_{km} & \dotsm & Z_{kk} & \dotsm & Z_{kp} & \dotsm & Z_{kk} - Z_{kp} \\
\vdots & & & \vdots & & \vdots & & \vdots & & \vdots \\
Z_{p1} & \dotsm & \dotsm & Z_{pm} & \dotsm & Z_{pk} & \dotsm & Z_{pp} & \dotsm & Z_{pk} - Z_{pp} \\
\vdots & & & \vdots & & \vdots & & \vdots & & \vdots \\
\vdots & & & \vdots & & \vdots & & \vdots & & \vdots \\ \Xcline{1-10}{0.25mm}
Z_{k1} - Z_{p1} & \dotsm & \dotsm & Z_{km} - Z_{pm} & \dotsm & Z_{kk} - Z_{pk} & \dotsm & Z_{kp} - Z_{pp} & \dotsm & Z_{th, kp} + Z_{b} \\
\end{array}
\right] & \\
Z_{th,kp} = Z_{kk} + Z_{pp} - Z_{kp} - Z_{pk} & \\
%
\end{aligned}
%
\end{equation}
\end{document}
I realize that the same question was asked in Where is the \matrix command? and Label rows of a matrix by characters, but the solutions provided there do not seem to simultaneously allow for 1. drawing horizontal lines and 2. aligning the main matrix with smaller equation under it (see the figure above).