Message Boards Message Boards

0
|
2240 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Unexpected output of Minors[ ] of a matrix

Hi team Wolfram Mathematica, I would like to ask the significance of the output that we get by using the Minors command in Mathematica. Since we need to do further manipulation to get the minors of the given matrix .So, can you please either give a proper reason and significance of the output we are getting or can you change how the Minors and Cofactors command work.

I have shared an image below regarding the same , in output 2 we are getting the matrix with a horizontal and vertical flip of the desired one (output 4).Can your team change the way how this command work , in order to obtain the desired output? It would be highly appreciated if you answer my query.

Below mentioned code is given for finding the Minors of a matrix:

mat5=Array[Subscript[a,## ] &,{3,3}]//MatrixForm

Minors[mat5]//MatrixForm

Instead, we need the output of the following command:

minorsMatrix[m_List?MatrixQ]:=Map[Reverse,Minors[m],{0,1}]

minorsMatrix[mat5]//MatrixForm
Attachment

Attachments:
POSTED BY: Sonal Dahiya
5 Replies

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. Posting code Images doesn't help other members to copy your code. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.

enter image description here

POSTED BY: EDITORIAL BOARD

Below mentioned code is given for finding the Minors of a matrix:

mat5=Array[Subscript[a,## ] &,{3,3}]//MatrixForm

Minors[mat5]//MatrixForm

Instead, we need the output of the following command:

minorsMatrix[m_List?MatrixQ]:=Map[Reverse,Minors[m],{0,1}]
minorsMatrix[mat5]//MatrixForm
POSTED BY: Sonal Dahiya

Check documentation for the function in question. (As a general rule, one should do that before posting.) The Details section explains what it does and in particular the ordering of the result.

Here is the example at hand (which should be in the body of the main message, not posted in a response). The code to get the different ordering is what is shown in the Details of the reference guide page.

mat3 = Array[a, {3, 3}];
Minors[mat3]
Reverse[Minors[mat3], {1, 2}]


(* Out[142]= {{-a[1, 2] a[2, 1] + a[1, 1] a[2, 2], -a[1, 3] a[2, 1] + 
   a[1, 1] a[2, 3], -a[1, 3] a[2, 2] + 
   a[1, 2] a[2, 3]}, {-a[1, 2] a[3, 1] + 
   a[1, 1] a[3, 2], -a[1, 3] a[3, 1] + 
   a[1, 1] a[3, 3], -a[1, 3] a[3, 2] + 
   a[1, 2] a[3, 3]}, {-a[2, 2] a[3, 1] + 
   a[2, 1] a[3, 2], -a[2, 3] a[3, 1] + 
   a[2, 1] a[3, 3], -a[2, 3] a[3, 2] + a[2, 2] a[3, 3]}}

Out[143]= {{-a[2, 3] a[3, 2] + a[2, 2] a[3, 3], -a[2, 3] a[3, 1] + 
   a[2, 1] a[3, 3], -a[2, 2] a[3, 1] + 
   a[2, 1] a[3, 2]}, {-a[1, 3] a[3, 2] + 
   a[1, 2] a[3, 3], -a[1, 3] a[3, 1] + 
   a[1, 1] a[3, 3], -a[1, 2] a[3, 1] + 
   a[1, 1] a[3, 2]}, {-a[1, 3] a[2, 2] + 
   a[1, 2] a[2, 3], -a[1, 3] a[2, 1] + 
   a[1, 1] a[2, 3], -a[1, 2] a[2, 1] + a[1, 1] a[2, 2]}} *)

Regarding the ordering, it is lexicographic based on rows and columns retained in constructing the given minor.

POSTED BY: Daniel Lichtblau

ThankYou Daniel for answering my query. I got your point. But I would like to request the Wolfram team to kindly make the code Minors to directly give the desired output not based on lexicographical ordering. Can it be done?

POSTED BY: Sonal Dahiya

Minors will not be changing.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract