Question: Please use variables, loops, if statements, your own function definitions and function calls to write the required functions. You may import functions from the math,
Please use variables, loops, if statements, your own function definitions and function calls to write the required functions. You may import functions from the math, copy, matplotlib.plot and numpy. Do NOT use numpy.linalg.lstsq(), numpy.linalg.det() or scipy.interpolate.CubicSpline. Please use comments so that I can learn and follow along with the code. Thank you!

3) Write a program that computer the determinant of a square matrix using the Rule of Minors. You must write and call at least the following 3 functions: def Submatrix(A.j.k) # which returns the remaining submatrix after removing row j and column k. The Submatrix function must not "damage" or change A when it returns (which means that it returns a modified copy of A). def Determinant(A) # which uses the Rule of Minors to calculate and return the determinant of A # I strongly recommend that you write this as a recursive function def main(): A = np.array([[1, -2, 3, 41, [5, 6, 7, 8], [-9, 10, -11, 61, [5, 4, -3, 271) print(Submatrix(A, 1, 2)) print("\ ", Determinant(A)) A = np.array([[-5, 1, -5, 0, 1, -41. [5, 0, 3, 5, 3, 51, [-2, -2, 1, 4, 3, -51, [4, 5, 0, 3, 4, -1], [-5, -2, -5, 5, -2, -21, [4, 5, 5, 0, 0, -271) print("\ ", Submatrix(A, 1, 2)) print("\\", Determinant(A))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
