Question
Using NumPy, define the matrices:
$$A = \begin{bmatrix} 2 & 3 & -1 \\ 1 & -1 & 2 \\ 3 & 1 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & -1 \\ 2 & -1 & 3 \end{bmatrix}$$
Compute and print:
(a) $A + B$
(b) $AB$ (matrix multiply)
(c) $A^T$ (transpose of A)
(d) $\det(A)$ using np.linalg.det
(e) Is $A$ invertible? Why or why not?