-2
\documentclass[a4paper,12pt,twoside]{report}
\usetikzlibrary{decorations.markings}
\begin{document}
 \begin{figure}[hbt!]
    \begin{center}
    \begin{tikzpicture}[scale=0.95,
                thick,
                acteur/.style={
                    circle,
                    fill=black,
                    thick,
                    inner sep=2pt,
                    minimum size=0.2cm,scale=0.65
                }
                ] 
                \node (a1) at (0,0) [acteur,label=left:\footnotesize{1}]{}; 
                \node (a2) at (1.5,0)  [acteur,label=right:\footnotesize{2}]{};           
                \node (a3) at (1.5,1.5) [acteur,label=right:\footnotesize{3}]{};     
                \node (a4) at (0,1.5) [acteur,label=left:\footnotesize{4}]{};         
                \node (a5) at (.75,3) [acteur,label=above:\footnotesize{5}]{};                
                \draw [green, decoration={markings, mark=at position 0.5 with {\arrow{>}}}, postaction={decorate}]  (a1) -- (a2); 
                \draw  [blue](a2) -- (a3); 
                \draw [green, decoration={markings, mark=at position 0.5 with {\arrow{>}}}, postaction={decorate}]  (a3) -- (a4);
                \draw  [red](a4) -- (a1);
                \draw [blue] (a4) -- (a5);
                \draw [red]  (a5) -- (a3);
                A(G)=
  \left[ {\begin{array}{rrrrr}
   0 & \mathrm{i} & 0 & 1 & 0 \\
   -\mathrm{i} & 0 & -1 &0 &0 \\
   0 & -1 & 0 & \mathrm{i} & 1\\
   1 & 0 & -\mathrm{i} &0 & -1\\
   0 & 0 &1 &-1 &0
  \end{array} } \right]
            \end{tikzpicture}




          \caption{ $G, A(G)$}\label{F2}
          \end{center}
    \end{figure}
\end{document}

Here I want to put the matrix just in the right of the graph. How to do that?

egreg
  • 1,121,712
JSN
  • 313
  • Please make your code compilable and format your question, so that your text is not part of your code. -use the format buttons at the top. – hpekristiansen Jun 25 '21 at 11:05
  • This question by @rugtyi789 had the same code and the same question format problem: https://tex.stackexchange.com/questions/602618/drawing-arrows-in-the-following-latex-picture - Are there any reason to have multiple accounts here? – hpekristiansen Jun 25 '21 at 11:10
  • thank s////////////////////// – JSN Jun 25 '21 at 11:39
  • 1
    @hpekristiansen It's possible there are two separate students copying the same wrong answer from the darkTeX-web in an effort to answer the same homework problem. LOL!! – Steven B. Segletes Jun 25 '21 at 12:01
  • @StevenB.Segletes: Yes it is possible. This question have my solution from the other question included (part one of an exercise?). -and ask for an other thing(part two?). Both questions were/are formatted strange with text at bottom formatted as part of the code. Anyway - there is nothing wrong by itself of having multiple accounts. Both behaviours are suspect in my opinion. -let us hope the teacher also knows about this site. – hpekristiansen Jun 25 '21 at 12:13
  • Please consider accepting one of the provided answers. This is true for almost all of your previous questions. – Dr. Manuel Kuehner Jul 26 '21 at 08:08

2 Answers2

2

You can (should) write your matrix outside of image:

enter image description here

I took a liberty and quite rewrite the code of the your image (with goal to be simpler):

\documentclass[a4paper,12pt,twoside]{report}
\usepackage{mathtools}  % new
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

\begin{figure}[hbt!] \centering \begin{tikzpicture}[baseline=(a3.south), acteur/.style = {circle, draw, fill, inner sep=2pt, node contents={}}, ->-/.style = {decoration={markings, mark=at position 0.5 with {\arrow{>}}}, draw=#1, postaction={decorate}},
every label/.append style = {font=\footnotesize}, every path/.append style = semithick ] \node (a1) [acteur,label=left:1]; \node (a2) at (1.5,0.0) [acteur,label=right:2]; \node (a3) at (1.5,1.5) [acteur,label=right:3]; \node (a4) at (0.0,1.5) [acteur,label=left:4]; \node (a5) at (.75,3.0) [acteur,label=5]; % \draw [->- = green] (a1) -- (a2); \draw [blue] (a2) -- (a3); \draw [->- = blue] (a3) -- (a4); \draw [red] (a4) -- (a1); \draw [blue] (a4) -- (a5); \draw [red] (a5) -- (a3); \end{tikzpicture} \qquad $A(G)= \begin{bmatrix}[r] 0 & i & 0 & 1 & 0 \ -i & 0 & -1 & 0 & 0 \ 0 & -1 & 0 & i & 1 \ 1 & 0 & i & 0 & -1 \ 0 & 0 & 1 & -1 & 0 \end{bmatrix}$

\caption{ $G, A(G)$}\label{Fd2} \end{figure} \end{document}

Zarko
  • 296,517
-1
\documentclass[a4paper,12pt,twoside]{report}
\usetikzlibrary{decorations.markings}
\begin{document}

\begin{figure}[hbt!]
    \begin{center}
    \begin{tikzpicture}[scale=0.95,
                thick,
                acteur/.style={
                    circle,
                    fill=black,
                    thick,
                    inner sep=2pt,
                    minimum size=0.2cm,scale=0.65
                }
                ] 
                \node (a1) at (0,0) [acteur,label=left:\footnotesize{1}]{}; 
                \node (a2) at (1.5,0)  [acteur,label=right:\footnotesize{2}]{};           
                \node (a3) at (1.5,1.5) [acteur,label=right:\footnotesize{3}]{};     
                \node (a4) at (0,1.5) [acteur,label=left:\footnotesize{4}]{};         
                \node (a5) at (.75,3) [acteur,label=above:\footnotesize{5}]{};                
                \draw [green, decoration={markings, mark=at position 0.5 with {\arrow{>}}}, postaction={decorate}]  (a1) -- (a2); 
                \draw  [blue](a2) -- (a3); 
                \draw [green, decoration={markings, mark=at position 0.5 with {\arrow{>}}}, postaction={decorate}]  (a3) -- (a4);
                \draw  [red](a4) -- (a1);
                \draw [blue] (a4) -- (a5);
                \draw [red]  (a5) -- (a3);
               \draw (7, 1.5) node {$A(G)=
  \left[ {\begin{array}{rrrrr}
   0 & \mathrm{i} & 0 & 1 & 0 \\
   -\mathrm{i} & 0 & -1 &0 &0 \\
   0 & -1 & 0 & \mathrm{i} & 1\\
   1 & 0 & -\mathrm{i} &0 & -1\\
   0 & 0 &1 &-1 &0
  \end{array} } \right]$};
   \end{tikzpicture}

\caption{ $G, A(G)$}\label{Fd2}
          \end{center}
    \end{figure} 
\end{document} 
JSN
  • 313