I am trying to place a matrix and a graph side-by-side in a tabular format, using the following code:
\begin{figure}[h]
\begin{center}
\begin{tabular}{p{5cm}c}\vspace{-3cm}
{$\displaystyle
\textbf{A}=
\begin{pmatrix}
10 & 2 & 1 & 4 & 0\\
2 & 10 & 0 & 0 & 2\\
1 & 0 & 10 & 0 & 0\\
4 & 0 & 0 & 10 & 1\\
0 & 2 & 0 & 1 & 10
\end{pmatrix}
$}
&
\begin{tikzpicture}
[auto=left,every node/.style={circle, draw=black, thick, minimum size=0.5cm}]
\node (0) at (0,1.5) {0};
\node (1) at (1.5,3) {1};
\node (2) at (1.5,1.5) {2};
\node (3) at (1.5,0) {3};
\node (4) at (3,1.5) {4};
\draw[-] (0) to (1);
\draw[-] (0) to (2);
\draw[-] (0) to (3);
\draw[-] (1) to (4);
\draw[-] (3) to (4);
\end{tikzpicture}
\end{tabular}
\caption{Caption}
\label{ex}
\end{center}
\end{figure}
This is correct, but I would like to put the symbol $\implies$ between the matrix and the graph. How can I do that? It is my first question here, so I am sorry for layout error.
p{5cm}@{$\implies$}c
which would result in the symbol between the two columns. I did not test vertical alignment though.\begin{center}
in afigure
environment. This adds unwanted space. Instead use\centering
.\mathbf
not\textbf
.