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

I'm trying to TeX the following matrix, from Guillemin and Pollack (1.4 #13)

enter image description here

The best I've been able to do is get the dashed lines with

\[ \left( \begin{array}{c:c} B &  C \\ \hdashline
D & E \end{array} \right) \]

If you want to test this try

\[ \left( \begin{array}{c:c} B &  C \\ \hdashline
D & E \end{array} \right) \]


Output looks like this:

enter image description here

share|improve this question
Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Oct 26 '12 at 4:48
up vote 11 down vote accepted

Perhaps the following is more suitable:

enter image description here

\usepackage{arydshln,leftidx,mathtools}% http://ctan.org/pkg/{arydshln,leftidx,mathtools}
  \leftidx{_{m-r}^{\phantom{m-r}\llap{$\scriptstyle r$}}}{\left( \begin{array}{c:c}
    \smash{\overset{r}{B}} & \mathclap{\smash{\overset{n-r}{C}}} \\
    D & E
  \end{array} \right)}{}


The gaps between the dashes of \hdashline has been shortened from 4pt down to 2pt. mathtools provides \mathclap (a zero-width box that is centred) and also loads amsmath, which provides \overset (a math accent-type macro). I've \smashed the elements in the first row to not let the array delimiters over the height of B or C.

leftidx is a super-small package that adds left indexing functionality. See Superscripts before a letter in math.

share|improve this answer
Interesting packages. First time am seeing them :-) Just put the A= to finish it up. – azetina Oct 26 '12 at 5:05
That's exactly what I was looking for. Thanks! – Frederick Oct 26 '12 at 7:29
@Werner -- the spacing around the parens (both inside and out) looks too wide to me. i'd also be inclined to raise the "overscripts" a tiny bit to avoid crashing into the right-hand paren if it's tightened (ah, yes, \smash wouldn't work in that case). otherwise, very nice. – barbara beeton Oct 26 '12 at 12:37

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.