Determinant with tikz latex
I need your help to formulate Sarrus rule for 3X3 matrix
Thanks in advance.
tikz-matrix
|
show 1 more comment
I need your help to formulate Sarrus rule for 3X3 matrix
Thanks in advance.
tikz-matrix
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
2
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
Off-topic. Is that a3x3
matrix?
– manooooh
Feb 23 at 16:33
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49
|
show 1 more comment
I need your help to formulate Sarrus rule for 3X3 matrix
Thanks in advance.
tikz-matrix
I need your help to formulate Sarrus rule for 3X3 matrix
Thanks in advance.
tikz-matrix
tikz-matrix
asked Feb 23 at 15:41
SaidSaid
252
252
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
2
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
Off-topic. Is that a3x3
matrix?
– manooooh
Feb 23 at 16:33
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49
|
show 1 more comment
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
2
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
Off-topic. Is that a3x3
matrix?
– manooooh
Feb 23 at 16:33
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
2
2
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
Off-topic. Is that a
3x3
matrix?– manooooh
Feb 23 at 16:33
Off-topic. Is that a
3x3
matrix?– manooooh
Feb 23 at 16:33
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49
|
show 1 more comment
1 Answer
1
active
oldest
votes
Here is a proposal.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1]{mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1]{mylabel};
}
end{tikzpicture}
end{document}
Or
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1] (LL-X) {mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1] (LU-X) {mylabel};
}
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LU-3.east) -- ++ (3,0) node[right] {Subtract these products};
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LL-3.east-|LU-3.east) -- ++ (3,0) node[right] {Add these products};
end{tikzpicture}
end{document}
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f476347%2fdeterminant-with-tikz-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is a proposal.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1]{mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1]{mylabel};
}
end{tikzpicture}
end{document}
Or
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1] (LL-X) {mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1] (LU-X) {mylabel};
}
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LU-3.east) -- ++ (3,0) node[right] {Subtract these products};
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LL-3.east-|LU-3.east) -- ++ (3,0) node[right] {Add these products};
end{tikzpicture}
end{document}
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
add a comment |
Here is a proposal.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1]{mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1]{mylabel};
}
end{tikzpicture}
end{document}
Or
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1] (LL-X) {mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1] (LU-X) {mylabel};
}
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LU-3.east) -- ++ (3,0) node[right] {Subtract these products};
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LL-3.east-|LU-3.east) -- ++ (3,0) node[right] {Add these products};
end{tikzpicture}
end{document}
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
add a comment |
Here is a proposal.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1]{mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1]{mylabel};
}
end{tikzpicture}
end{document}
Or
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1] (LL-X) {mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1] (LU-X) {mylabel};
}
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LU-3.east) -- ++ (3,0) node[right] {Subtract these products};
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LL-3.east-|LU-3.east) -- ++ (3,0) node[right] {Add these products};
end{tikzpicture}
end{document}
Here is a proposal.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1]{mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1]{mylabel};
}
end{tikzpicture}
end{document}
Or
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{matrix}
begin{document}
begin{tikzpicture}
edeflstadd{{0,16,-12}}
edeflstsub{{-4,0,6}}
matrix[matrix of math nodes,nodes={text width=1.5em}] (mat)
{
0 & 2 & 1 & 0 & 2 \
3 & -1 & 2 & 3 & -1\
4 & -4 & 1 & 4 & -4\
};
foreach X [evaluate=X as Y using {int(X+2)}]in {1,2,3}
{pgfmathtruncatemacro{mylabel}{lstadd[X-1]}
draw[purple,-latex,thick] (mat-1-X.north west) -- (mat-3-Y.south east)
node[pos=1.1] (LL-X) {mylabel};
pgfmathtruncatemacro{mylabel}{lstsub[X-1]}
draw[purple,-latex,thick] (mat-3-X.south west) -- (mat-1-Y.north east)
node[pos=1.1] (LU-X) {mylabel};
}
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LU-3.east) -- ++ (3,0) node[right] {Subtract these products};
draw[line width=1mm,purple,latex-,shorten >=1cm,shorten <=1cm]
(LL-3.east-|LU-3.east) -- ++ (3,0) node[right] {Add these products};
end{tikzpicture}
end{document}
edited Feb 23 at 15:59
answered Feb 23 at 15:54
marmotmarmot
105k4126241
105k4126241
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
add a comment |
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
Wonderful!! thanks so much marmot.
– Said
Feb 23 at 15:57
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f476347%2fdeterminant-with-tikz-latex%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
There is already an answer of that sort here.
– marmot
Feb 23 at 15:42
Thanks marmot. How to add the multiplication results (-4 0 6) at up and (0 16 -12) at down of matrix?
– Said
Feb 23 at 15:49
2
I never teach Sarrus' rule. It is handy, if you know it, in some cases; but students tend to use it also for larger matrices.
– egreg
Feb 23 at 16:07
Off-topic. Is that a
3x3
matrix?– manooooh
Feb 23 at 16:33
see tex.stackexchange.com/questions/257043
– Zarko
Feb 23 at 16:49