# MATRIX COFACTOR

835 views (last 30 days)
Mariana on 2 Feb 2012
Commented: Walter Roberson on 11 Oct 2021 at 20:04
I need to know a function to calculate the cofactor of a matrix, thank a lot!
Walter Roberson on 8 Oct 2021 at 7:05
I suspect that the English word would be "minor". The Spanish word "menor" can be translated as English "minor" in some situations.

Walter Roberson on 2 Feb 2012
Mariana on 7 Feb 2012
Walter,
I thing I get it.. I forget to add the function to the PATH through the SET PATH in the menu file.. Thank you very much for all..
Just one question more.. Matlab run in linux? what distribution is better?

Dr. Murtaza Khan on 28 Sep 2019
A = [
2 4 1
4 3 7
2 1 3
]
detA = det(A)
invA = inv(A)
cofactorA = transpose(detA*invA)
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 11 Oct 2021 at 20:04
This is not MATLAB code. It might be Octave.

Francisco Trigo on 6 Feb 2020
The matrix confactor of a given matrix A can be calculated as det(A)*inv(A), but also as the adjoint(A). And this strange, because in most texts the adjoint of a matrix and the cofactor of that matrix are tranposed to each other. But in MATLAB are equal. I found a bit strange the MATLAB definition of the adjoint of a matrix.
Zuhri Zuhri on 28 Sep 2021 at 5:25
adjoint matrix is ​​the transpose of the cofactor matrix so the above result is correct