# Aligning picture with displaymath

I have a small picture of a graph and I would like to align it with its adjacency matrix, defined within math environment, side by side on a page. I tried to use subfig package, but the matrix is then misaligned (it begins vertically in the middle of the picture).

EDIT: I have

\begin{figure}[H]
\centering
\includegraphics{Graph1.png}
\begin{minipage}{1.2in}
\begin{math}
\begin{matrix}
1 & 0 & 1 & 1 & 0 & 1\\
0 & 1 & 0 & 1 & 0 & 1\\
1 & 0 & 1 & 0 & 1 & 1\\
1 & 1 & 0 & 1 & 1 & 0\\
0 & 0 & 1 & 1 & 1 & 0\\
1 & 1 & 1 & 0 & 0 & 1
\end{matrix}
\end{math}
\end{minipage}
\end{figure}


If you include it in a document, you will see the matrix is "misaligned" - it is lower than the image. I would like them verticaly centered to the center.

\parbox{1.2in}{\includegraphics{Graph1.png}}


then it is working, but I get Overfull \hbox.

• Hi Jakub, Welcome to TeX.SE!! Could you provide a screenshot of what you're looking for, ideally with MWE. I'm confident this problem can be solved, perhaps with minipages – cmhughes Mar 26 '12 at 15:24

\raisebox{-.5\height}{\includegraphics{Graph1.png}}

• Another way, with amsmath, is \begin{gathered}\includegraphics{Graph1.png}\end{gathered} – egreg Mar 26 '12 at 23:07