Determinant with tikz latex












1















I need your help to formulate Sarrus rule for 3X3 matrix
enter image description here



Thanks in advance.










share|improve this question























  • 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
















1















I need your help to formulate Sarrus rule for 3X3 matrix
enter image description here



Thanks in advance.










share|improve this question























  • 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














1












1








1


0






I need your help to formulate Sarrus rule for 3X3 matrix
enter image description here



Thanks in advance.










share|improve this question














I need your help to formulate Sarrus rule for 3X3 matrix
enter image description here



Thanks in advance.







tikz-matrix






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 a 3x3 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











  • 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

















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










1 Answer
1






active

oldest

votes


















1














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}


enter image description here



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}


enter image description here






share|improve this answer


























  • Wonderful!! thanks so much marmot.

    – Said
    Feb 23 at 15:57











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
});


}
});














draft saved

draft discarded


















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









1














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}


enter image description here



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}


enter image description here






share|improve this answer


























  • Wonderful!! thanks so much marmot.

    – Said
    Feb 23 at 15:57
















1














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}


enter image description here



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}


enter image description here






share|improve this answer


























  • Wonderful!! thanks so much marmot.

    – Said
    Feb 23 at 15:57














1












1








1







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}


enter image description here



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}


enter image description here






share|improve this answer















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}


enter image description here



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}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








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



















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?