A square matrix M is called orthogonal if M" M = 1. Common examples of orthogonal matrices are matrices that represent rotations and reflections. (1) Give an nontrivial example of an orthogonal matrix M. Write numpy code to check that the columns of M (when interpreted as vectors) are unit vectors (magnitude of 1) and every pair of columns is orthogonal (perpendicular). Also illustrate (using numpy and matplotlib) that when M is used as a matrix transformation, it is an isometry, i.e., it preserves both magnitudes of vectors and angles between vectors. (2) The trace of a square matrix is the sum of the elements on its main diagonal (from the top-left to the bottom-right). Use a large number of randomly generated 2 x 2 matrices (with elements between -10 and 10) to investigate the following: (a) How the eigenvalues of a matrix are related to its trace and determinant. (b) Whether the eigenvalues of a symmetric matrix are real or complex numbers. (c) For matrix A what is the value of A² – tA + di where t is the trace of A, d is the determinant of A, and I is the identity matrix. You may find these numpy functions useful: numpy.random.randint(), numpy.linalg.eig(), numpy.all(), and numpy.isreal(). (3) The bivariate normal distribution (the 2D version of the multivariate normal distribution) has a 2 x 1 mean vector u and a 2 x 2 covariance matrix 2. (a) Choose u and I to illustrate your understanding of the ideas in this part. Use numpy (or scipy) to generate a n x 2 random sample from the particular bivariate normal distribution with your chosen u and E. Plot your random sample on a scatterplot. Calculate the sample mean vector and the sample covariance matrix C using numpy.cov() and compare these to μ and Σ. (b) Subtract the mean of each column of the sample from that column; this gives the centred sample Xc. Explain how C is related to the matrix product XC Xc. Calculate the sample correlation matrix R using numpy.corrcoef(). Let E be the diagonal matrix consisting of the square roots of the diagonal elements of C. Explain how R can be calculated from C and E-1 by matrix multiplication. (c) Diagonalise the sample covariance matrix C as C = PDP-1 and add the columns of P as appropriate vectors on your scatterplot from part (a). Apply this P as a matrix transformation to each of the points in the centred sample and plot the transformed points on a new scatterplot. Calculate the sample covariance matrix of the transformed points and therefore explain how the diagonal entries in the matrix D can be interpreted in a statistical sense. (d) Summarise and critique what you discovered in this part, including how these results depend on your choice of u and E, and the sample size n. The process carried in this part is (almost) the multivariate statistical analysis method called Principal Component Analysis (PCA).