Minor of Matrix
Contents
Minor of Matrix#
Write a function that returns the Minor of Matrix of a 3x3 Matrix for a given line \((i)\) and column \((j)\)
Rules#
Function returns a Numpy ndarray of shape=2x2
Function should work for all possible \(i,j\) combination
Useful Links#
-
Specially:
ix_()
Minor of Matrix: Definition#
Minor of matrix for a particular element in the matrix is defined as the matrix obtained after deleting the row and column of the matrix in which that particular element lies.
- cuemath
Example#
For example, consider the following 3x3 square matrix A:
The Minor of Matrix for the line \(i=1\) and column \(j=1\) is:
and the Minor of Matrix for the line \(i=2\) and column \(j=3\) is:
Index Notation#
Please note that in Matrix, the index starts with 1
. So, first line is index 1
.
On the other hand, indexing in python starts at zero
, so, first line is index 0
.
Please remember to add some index “conversion” to ensure that you access the desired index!
Disclaimer#
The definition of Minor of Matrix is not exactly the one presented above. The Minor of Matrix is the determinant of the \(M_{ij}\) matrix. But for the sanity of this challenge, let’s stop a step earlier and just get the Matrix \(M_{ij}\) itself.