Question: 1. Write a class of objects called matrix_2 that act like a 2x2 matrix. Make sure to include: a. __init__ method b. __add__ method (add
1. Write a class of objects called matrix_2 that act like a 2x2 matrix. Make sure to include: a. __init__ method b. __add__ method (add two 2x2 matrices) c. __mul__ method (multiply two 2x2 matrices)
d. __str__ method e. determinant() a method that finds a matrix's determinant f. invert() a method that finds a matrix's inverse if it has one or returns 'singular matrix' if it does not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
