A diagram with matrices
up vote
2
down vote
favorite
I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?
draw ticks tikz-graphdrawing
add a comment |
up vote
2
down vote
favorite
I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?
draw ticks tikz-graphdrawing
1
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?
draw ticks tikz-graphdrawing
I want to draw the following diagram which contains two matrices (2x2 on left and 4x4 on right) and a box. Could someone help?
draw ticks tikz-graphdrawing
draw ticks tikz-graphdrawing
asked Nov 19 at 8:50
user149973
241
241
1
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53
add a comment |
1
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53
1
1
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center
This could be a starting point for your quest:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}
begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}
end{document}
which would give:

Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.
add a comment |
up vote
3
down vote
Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.
documentclass[fleqn]{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{tikzmark}
usetikzlibrary{decorations.markings}
% from https://tex.stackexchange.com/a/39282/121799
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{document}
[
tikzmarknode{L}{begin{pmatrix}
1 & 2 \ 3 & 4
end{pmatrix}}
qquadqquadqquadqquadqquadqquad
tikzmarknode{R}{begin{pmatrix}
1 & 2 & 3 & 4 \
5 & 6 & 7 & 8 \
9 & 10 & 11 & 12 \
13 & 14 & 15 & 16 \
end{pmatrix}}
]
begin{tikzpicture}[overlay,remember picture]
draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
node[midway,fill=white,draw,solid]{DST};
end{tikzpicture}
end{document}

(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center
This could be a starting point for your quest:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}
begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}
end{document}
which would give:

Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.
add a comment |
up vote
3
down vote
With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center
This could be a starting point for your quest:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}
begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}
end{document}
which would give:

Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.
add a comment |
up vote
3
down vote
up vote
3
down vote
With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center
This could be a starting point for your quest:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}
begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}
end{document}
which would give:

Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.
With some motivations from @Alain Matthes answer: Tikz: Arrowheads in the center
This could be a starting point for your quest:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{decorations.markings}
begin{document}
pagestyle{empty}
%
tikzstyle{int}=[draw, minimum size=2em]
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{tikzpicture}[node distance=2.5cm, auto]
node [int] (a) {DST};
node (b) [left of=a, coordinate] {a};
node (c) [right of=a, coordinate] {a};
draw[dashed, ->-=0.5] (b) --(a);
draw[dashed, ->-=0.5] (a) --(c);
node (d) [right of=c,shift={(-1.1cm,0mm)}]{$begin{pmatrix}
c&c&v&b\
a&b&c&d\
a&b&c&d\
a&b&c&d
end{pmatrix}$};
node (e) [right of=b, shift={(-3.1cm,0mm)}]{$begin{pmatrix}
c&c\
a&b
end{pmatrix}$};
end{tikzpicture}
end{document}
which would give:

Note: Since your arrows are not aligned in the center, I used the macro option from the answer to play with the placement of the arrows as you define. For more information on how-to, please refer the link given above.
edited Nov 19 at 9:39
answered Nov 19 at 9:24
Raaja
1,8102523
1,8102523
add a comment |
add a comment |
up vote
3
down vote
Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.
documentclass[fleqn]{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{tikzmark}
usetikzlibrary{decorations.markings}
% from https://tex.stackexchange.com/a/39282/121799
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{document}
[
tikzmarknode{L}{begin{pmatrix}
1 & 2 \ 3 & 4
end{pmatrix}}
qquadqquadqquadqquadqquadqquad
tikzmarknode{R}{begin{pmatrix}
1 & 2 & 3 & 4 \
5 & 6 & 7 & 8 \
9 & 10 & 11 & 12 \
13 & 14 & 15 & 16 \
end{pmatrix}}
]
begin{tikzpicture}[overlay,remember picture]
draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
node[midway,fill=white,draw,solid]{DST};
end{tikzpicture}
end{document}

(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
add a comment |
up vote
3
down vote
Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.
documentclass[fleqn]{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{tikzmark}
usetikzlibrary{decorations.markings}
% from https://tex.stackexchange.com/a/39282/121799
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{document}
[
tikzmarknode{L}{begin{pmatrix}
1 & 2 \ 3 & 4
end{pmatrix}}
qquadqquadqquadqquadqquadqquad
tikzmarknode{R}{begin{pmatrix}
1 & 2 & 3 & 4 \
5 & 6 & 7 & 8 \
9 & 10 & 11 & 12 \
13 & 14 & 15 & 16 \
end{pmatrix}}
]
begin{tikzpicture}[overlay,remember picture]
draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
node[midway,fill=white,draw,solid]{DST};
end{tikzpicture}
end{document}

(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
add a comment |
up vote
3
down vote
up vote
3
down vote
Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.
documentclass[fleqn]{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{tikzmark}
usetikzlibrary{decorations.markings}
% from https://tex.stackexchange.com/a/39282/121799
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{document}
[
tikzmarknode{L}{begin{pmatrix}
1 & 2 \ 3 & 4
end{pmatrix}}
qquadqquadqquadqquadqquadqquad
tikzmarknode{R}{begin{pmatrix}
1 & 2 & 3 & 4 \
5 & 6 & 7 & 8 \
9 & 10 & 11 & 12 \
13 & 14 & 15 & 16 \
end{pmatrix}}
]
begin{tikzpicture}[overlay,remember picture]
draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
node[midway,fill=white,draw,solid]{DST};
end{tikzpicture}
end{document}

Rather similar to Raaja's nice answer except that I am using tikzmark to annotate an ordinary equation, such that identations are unchanged. And the TikZ path can be done in one stroke.
documentclass[fleqn]{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{tikzmark}
usetikzlibrary{decorations.markings}
% from https://tex.stackexchange.com/a/39282/121799
tikzset{->-/.style={decoration={
markings,
mark=at position #1 with {arrow{>}}},postaction={decorate}}}
begin{document}
[
tikzmarknode{L}{begin{pmatrix}
1 & 2 \ 3 & 4
end{pmatrix}}
qquadqquadqquadqquadqquadqquad
tikzmarknode{R}{begin{pmatrix}
1 & 2 & 3 & 4 \
5 & 6 & 7 & 8 \
9 & 10 & 11 & 12 \
13 & 14 & 15 & 16 \
end{pmatrix}}
]
begin{tikzpicture}[overlay,remember picture]
draw[>=latex,dashed,->-=0.2,->-=0.8] (L) -- (R)
node[midway,fill=white,draw,solid]{DST};
end{tikzpicture}
end{document}

edited Nov 19 at 14:43
answered Nov 19 at 14:33
marmot
77.7k487166
77.7k487166
(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
add a comment |
(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
(+1) Nice answer!! Thanks for making my name sound like: en.wikipedia.org/wiki/Ra%27s_al_Ghul
– Raaja
Nov 19 at 14:41
1
1
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
@Raaja Sorry for misspelling your name!!
– marmot
Nov 19 at 14:43
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
Ha ha, that's okay :D
– Raaja
Nov 19 at 14:58
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460702%2fa-diagram-with-matrices%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What have you tried so far? Please add a minimal working example (MWE).
– epR8GaYuh
Nov 19 at 8:51
Actually, I have never made a drawing in latex before. So, I have completely no idea how to begin.
– user149973
Nov 19 at 8:53