## LaTeX - problems with xy-pic

Hi,

I am trying to show the reader what is the main diagonal of a matrix, so i wrote the code using the xy-pic package, this is the code:
Code:
\begin{displaymath}
\left(
\xymatrix @=0.5pc
{
a \ar@{-}[dr] & b\\
c & d\\
}
\right)
\end{displaymath}
In the compiled file the parenthesis are taller than the matrix, and i couldn't found a solution, so i am asking help!

Thanks,

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target
 Hi Aikon, the problem here is the baseline of the matrix, which is not at the center. You can fix that by \vcenter: Code: \begin{displaymath} \left(\vcenter{ \xymatrix @=0.5pc { a \ar@{-}[dr] & b\\ c & d\\ }} \right) \end{displaymath} On LaTeX-Community.org, it has been made similarly here: Parentheses around a sigma sum with huge subscript. There just an additional \hbox has been used within \vcenter, which an be a good idea in some cases. Stefan

 Tags latex, matrix