# How to adjust the width of a \hdashline inside a pmatrix?

I'm using \hdashline from the arydshln package to draw a horizontal line inside a pmatrix:

How can I reduce the width of this line to prevent it from touching the outer parentheses?

-

One way to do this is to use an array environment and make use of the @{} intercolumn specifiers to put in some negative space. Here is one piece of example code.

\documentclass{article}

\usepackage{amsmath,array,arydshln}

\begin{document}

\begin{equation*}
\left(
\mkern4mu\begin{array}{@{\mkern-4mu}c@{\mkern-4mu}}
\begin{pmatrix}
r_{11}&r_{12}&r_{13}\\
r_{21}&r_{22}&r_{23}\\
r_{31}&r_{32}&r_{33}\\
\end{pmatrix}
\begin{pmatrix}
x\\y\\z
\end{pmatrix}
\\
\hdashline 1
\end{array}\mkern4mu
\right)
\end{equation*}

\end{document}


-
You get the same result without all the \mkern commands and with \begin{array}{@{}c@{}} for the outer array. –  egreg Sep 5 '12 at 17:44
Thanks to both of you! Are there any disadvantages of using array instead of pmatrix? Mostly I read that amsmath is recommended for anything concerning mathematics... –  ph4nt0m Sep 5 '12 at 19:00
@ph4nt0m: In this instance, Andrew inserted some horizontal padding between the matrix and the parentheses, so using array is necessary; it requires a distinct placement of the parentheses. \pmatrix inserts the parentheses automatically, removing an "hook" into the location between the two constructs. –  Werner Sep 6 '12 at 0:30
@Werner I understand that it is necessary to use array instead of pmatrix here. But when/why should I use ´pmatrix´ at all then? Is the fact that pmatrix already includes the parantheses really the only difference or are there any further advantages of the amsmath environments? –  ph4nt0m Sep 6 '12 at 8:06
@ph4nt0m arydshln is desinged to work with array and tabular environments with the specific intent of making dashed rules that extend to out to the edges, and with various ways to tweak this. For mathematics pmatrix is the first choice, but (even with the mathtools enhancement) it does not have good facilities for dealing block matrices containing dividing lines. –  Andrew Swann Sep 6 '12 at 21:37