TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
 m_{1+}\hat{p}_{1H}\hat{q}_{1H} & \multicolumn{2}{c}{\text{\kern0.5em\smash{\raisebox{-1ex}{\Large 0}}}} & \multicolumn{1}{|c}{m_{12}\hat{p}_{1H}\hat{q}_{1H}}  \\ 
   & \ddots &  &\multicolumn{1}{|c}{\vdots}\\ 
\multicolumn{2}{c}{\text{\kern-0.5em\smash{\raisebox{0.75ex}{\Large 0}}}} & m_{I+}\hat{p}_{IH}\hat{q}_{IH} & \multicolumn{1}{|c}{m_{I2}\hat{p}_{IH}\hat{q}_{IH}} \\ 
\cline{1-5} \\ m_{12}\hat{p}_{1H}\hat{q}_{1H} & \hdots & m_{I2}\hat{p}_{IH}\hat{q}_{IH} & \multicolumn{1}{|c}{\sum_{i=1}^I m_{i2}\hat{p}_{iH}\hat{q}_{iH}}

I want this:

enter image description here

I have this:

enter image description here

share|improve this question
Please post a minimal working example next time. You haven't done that in any of your questions so far. – Svend Tveskæg Jun 24 '14 at 17:52
up vote 7 down vote accepted

Here is what I made...

I didn't use the pmatrix, but the arrayenvironment, and the multirow package to put the 0 in 2 rows... I think it's better...

Here's what I've got : My Solution

Here is a MWE :


\usepackage{amsmath, amsthm, amssymb, amsfonts}


\renewcommand\arraystretch{1.5} % To increase the spaces between rows...


\left( \begin{array}{ccc|c}
 m_{1+}\hat{p}_{1H}\hat{q}_{1H} & & \multirow{2}{*}{\Large 0} & m_{12}\hat{p}_{1H}\hat{q}_{1H}  \\ 
 \multirow{2}{*}{\Large 0}   & \ddots &  & \vdots\\ 
& & m_{I+}\hat{p}_{IH}\hat{q}_{IH} & m_{I2}\hat{p}_{IH}\hat{q}_{IH} \\ \hline 
m_{12}\hat{p}_{1H}\hat{q}_{1H} & \hdots & m_{I2}\hat{p}_{IH}\hat{q}_{IH} & \displaystyle{\sum_{i=1}^I m_{i2}\hat{p}_{iH}\hat{q}_{iH}}


I hope it helps...

PS : the displaystyle option in the last cell is to force LaTeX to write the expression like in classical math mode...

share|improve this answer

I would stay away from that monster and instead go with


Let $a$ be the vector and m be the diagonal matrix given by 
a = \begin{pmatrix}\hat{p}_{1H}\hat{q}_{1H} & \ldots & \hat{p}_{IH}\hat{q}_{IH}\end{pmatrix}^T
\!\!,\ \ m = \diag{m_{12},\ldots,m_{I2}},
then the info matrix $A$ is given by 
A = \begin{pmatrix}m+\diag{a}&ma\\ (ma)^T &\;\ \|ma\|_1\end{pmatrix}


with tiny adjustments here and there thanks to Aditya's recommendation.

enter image description here

share|improve this answer
I appreciate the sound advice :) – bdeonovic Jun 18 '14 at 2:14
In this notation, you can also get rid of the horizontal and vertical lines. – Aditya Jun 24 '14 at 15:51
@Aditya Well said. I'll update – percusse Jun 24 '14 at 17:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.