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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!