Question: Write a function which accepts a matrix, checks to make sure it's square, and if it is, calculates the determinant. Assume the input has to
Write a function which accepts a matrix, checks to make sure it's square, and if it is, calculates the determinant. Assume the input has to be of size 3x3. Your final sum should loop over the dimension of the matrix and not just be an addition of all of the elements individually. You should find the determinant of the matrix:
[[2, -1, 5], [3, 2, 2], [1, 3, -1]]
In Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
