Week 4: Thursday ---------------- Q1. (50) Find the inverse of a 2x2 matrix using the following method. Swap the diagonals. Change the sign of the non-diagonal elements. Find the determinant of this new matrix. Multiply each term of the new matrix by the inverse of the determinant. This is the inverse of the matrix. Check that this is the inverse by multiplying with itself. What is the product? Example: If matrix is 1 2 3 4 after swapping and reversing the sign, the matrix becomes 4 -2 -3 1 The determinant is -2. therefore, inverse matrix is -2 1 1.5 -0.5 Q2. (50) Input a 3x3 matrix, and output all 2x2 square matrices in it. The rows and columns of the 2x2 matrices may not be adjacent in the original matrix. However, the elemnts in a row (or column) of the 2x2 matrix must appear in the same row (or column) of the original matrix. For each such matrix, also output the sum of its elements.