1
$\begingroup$

This question already has an answer here:

I'm beginner in Mathematica.

I have a $3 \times 3$ matrix, say $A$, in which some of its entries are nonzero (I know which entries are nonzero); for example the entries $a_{12}$, $a_{13}$, $a_{21}$, $a_{23}$ and $a_{31}$. But the nonzero entries can have 3 different values, say $x,y$ and $z$. I want to see determinant of $A$ in all these different cases. How can I do that?

Few months age I asked this question but in an ambiguous way, so I couldn't get the answer.

Bests,

$\endgroup$

marked as duplicate by Henrik Schumacher, m_goldberg, rhermans, kglr, Mr.Wizard May 31 '18 at 9:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ yeah, but that time my question was ambiguous and I couldn't get the answer. $\endgroup$ – A. Mpi May 31 '18 at 6:57
  • 1
    $\begingroup$ But that time, you accepted an answer. $\endgroup$ – Henrik Schumacher May 31 '18 at 7:00
  • 1
    $\begingroup$ Maybe. but it doesn't work now $\endgroup$ – A. Mpi May 31 '18 at 7:05
  • 1
    $\begingroup$ If instead of this discussions you answered me, everything was finished Henrik $\endgroup$ – A. Mpi May 31 '18 at 7:06
  • 2
    $\begingroup$ @A.Mpi wait.... "If instead of this discussions you answered me, everything was finished Henrik – A. Mpi" With such rude comments you expect to inspire anybody to volunteer their time to look at your problem? Your question will be put on-hold because it may be considered a duplicate. You can edit your question if you consider this is a mistake and give great emphasis in what was NOT answered in the other question. $\endgroup$ – rhermans May 31 '18 at 8:21
0
$\begingroup$

Maybe you simply require something like the following?

myarr = (Array[a, {3, 3}] /. Thread[{a[1, 1], a[2, 3], a[3, 2]} ->  0]);
Det[myarr]

a[1, 3] a[2, 2] a[3, 1] - a[1, 2] a[2, 1] a[3, 3]

nonzero1 = Thread[{a[1, 2], a[1, 3], a[2, 1], a[2, 2], a[3, 1], a[3, 3]} ->
{1, 4, 6, 8, 100, 3}];
nonzero2 = Thread[{a[1, 2], a[1, 3], a[2, 1], a[2, 2], a[3, 1], a[3, 3]} -> Range[6]];
nonzero3 = Thread[{a[1, 2], a[1, 3], a[2, 1], a[2, 2], a[3, 1], a[3, 3]} -> RandomReal[1, 6]];

 

Det[myarr] /. nonzero1
Det[myarr] /. nonzero2
Det[myarr] /. nonzero3

-3218

-58

-0.168692

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.