In[]:=
ResourceFunction["CofactorMatrix"][{{3,2,5},{4,3,-1},{2,3,4}}]
Out[]=
{{15,-18,6},{7,2,-5},{-17,23,1}}
In[]:=
(*The`m_List`isalistofsix6×6matrices)2.Definesthe`MinorMatrix`function3.Definesthe`CofactorMatrix`function*)m_List={{{0,0,2,0,0,0},{0,0,0,0,0,0},{-2,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,1,0,0},{0,0,1,0,0,0},{0,-1,0,0,0,0},{-1,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,1,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{-1,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,0,1,0},{0,0,0,1,0,0},{0,0,-1,0,0,0},{0,-1,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,2,0},{0,0,0,0,0,0},{0,0,-2,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,1,0,0},{0,0,0,0,0,0},{0,-1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}};(*Nowcallthefunctiontoseeoutput*)CofactorMatrix[m_List[[1]]](*Formatrix1*)ResourceFunction["CofactorMatrix"][{{0,0,2,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
CofactorMatrix[m]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
(*Formatrix2*)ResourceFunction["CofactorMatrix"][{{0,0,0,1,0,0},{0,0,1,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
(*Formatrix3*)ResourceFunction["CofactorMatrix"][{{0,0,0,0,1,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
In[]:=
(*Formatrix4*)ResourceFunction["CofactorMatrix"][{{0,0,0,0,0,0},{0,0,0,0,1,0},{0,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
In[]:=
(*Formatrix5*)ResourceFunction["CofactorMatrix"][{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,2,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
In[]:=
(*Formatrix6*)ResourceFunction["CofactorMatrix"][{{0,0,0,0,0,0},{0,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}]
Out[]=
{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}
In[]:=
(*Forallmatricesatonceusingthestructureconstantsfromtheuppertriangularpartofthematrix*)ResourceFunction["CofactorMatrix"][{{{0,0,2,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,1,0,0},{0,0,1,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,1,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,0,1,0},{0,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,2,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}},{{0,0,0,0,0,0},{0,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}}]
Out[]=