2

enter image description hereI have any array which I would like to consider two cases from it so to write it firstly then to consider two diagonal arrows lead to two vertical arrays.

I wrote the above but

$$x = \left( {\begin{array}{c}
   x_1 \\
   x_2 \\
   x_3  \\
   \vdots \\   
   x_n \\
   \end{array} } \right) \nearrow y_1 =
  \left( {\begin{array}{c}
   y_1 \\
   y_2 \\ 
   y_3 \\
  \vdots \\   
   y_n \\
    \end{array} } \right) \searrow y_2 =
  \left( {\begin{array}{c}
   y_1 \\
   y_2 \\ 
   y_3 \\
     \vdots \\   
   y_n \\
    \end{array} } \right)$$

As you see in the picture that y_1 and y_2 are not vertical! How could I bring y_2 below y_1.

P.S: I am interested to solve this problem without using tikZ

Jean
  • 35

2 Answers2

2

For very simple arrows one may use the \vector macro provided by the LaTeX kernel. The syntax is

\vector(x,y){length}

where x and y are integers between -4 and 4 which specify the direction, and the length is given in \unitlength (predefined 1pt).

\documentclass{article}

\usepackage{amsmath}

\begin{document}

With \verb+\nearrow+/\verb+\searrow+
\[
x = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ \vdots \\ x_n \end{pmatrix}
\begin{aligned}
\raisebox{-2\height}{$\nearrow$\quad} & y_1 = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix} \\[1ex]
\raisebox{2\height}{$\searrow$\quad}  & y_2 = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix}
\end{aligned}
\]

With \verb+\vector+
\[
x = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ \vdots \\ x_n \end{pmatrix}
\vcenter{\vbox{\hbox{\vector(2,3){15}}\hbox{\vector(2,-3){15}}}}\quad
\begin{aligned}
y_1 &= \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix} \\[1ex]
y_2 &= \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix}
\end{aligned}
\]

\end{document}

enter image description here

Some cosmetic changes to your code

campa
  • 31,130
  • thanks for the great answer. Using the second solution, is there a possibility to control the size? by the way, I modified the sentence :) – Jean Feb 24 '20 at 13:59
  • @Jean Give a look at https://en.wikibooks.org/wiki/LaTeX/Picture#Arrows – campa Feb 24 '20 at 15:06
1

You could realize your diagonal arrows for the three matrix using tikz-cd package typical for commutative-diagrams or xy package that it has another structure than tikz-cd but that it generates the same result. Being tikz-cd as a big matrix [row sep=-.62in,column sep=.5in] inform you that the distance of the rows and the columns. In the package's documentation you can finded further explanations in this way.

enter image description here

%% Compile and read me!
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[row sep=-.62in,column sep=.5in]
& y_1 = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix} \\
x = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ \vdots \\ x_n \end{pmatrix} \arrow[ru] \arrow[rd] &\\
& y_2 = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ \vdots \\ y_n \end{pmatrix}
\end{tikzcd}
\end{document}

Sincerely my code is off-topic with the tags that you have chosen.

Sebastiano
  • 54,118