跳到主要内容

東京大学 新領域創成科学研究科 メディカル情報生命専攻 2015年8月実施 問題8

Author

zephyr

Description

Answer the following questions about linear algebra.

(1)

Compute the inverse matrix of the following matrix,

(1225).\begin{pmatrix} 1 & 2 \\ 2 & 5 \end{pmatrix}.

(2)

Consider data points (xi,yi),i=1,,n(x_i, y_i), i = 1, \dots, n in a two-dimensional space. Variance with respect to the x-axis, variance with respect to the y-axis, and covariance are respectively defined as

σx=1ni=1n(xixˉ)2,σy=1ni=1n(yiyˉ)2,σxy=1ni=1n(xixˉ)(yiyˉ)\sigma_x = \frac{1}{n} \sum_{i=1}^{n} (x_i - \bar{x})^2, \quad \sigma_y = \frac{1}{n} \sum_{i=1}^{n} (y_i - \bar{y})^2, \quad \sigma_{xy} = \frac{1}{n} \sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})

where xˉ,yˉ\bar{x}, \bar{y} denote the averages with respect to the x and y axes, respectively.

A: Compute the variance-covariance matrix

(σxσxyσxyσy)\begin{pmatrix} \sigma_x & \sigma_{xy} \\ \sigma_{xy} & \sigma_y \end{pmatrix}

for the following data points, (2,2),(2,2),(1,1),(1,1)(-2, -2), (2, 2), (1, -1), (-1, 1).

B: Compute all eigenvalues and eigenvectors of the variance-covariance matrix.

(3)

Prove that, if the eigenvalues of a regular matrix A are λ1,,λn\lambda_1, \dots, \lambda_n, those of the inverse matrix A1^{-1} are 1/λ1,,1/λn1/\lambda_1, \dots, 1/\lambda_n.


回答以下关于线性代数的问题。

(1)

计算以下矩阵的逆矩阵,

(1225).\begin{pmatrix} 1 & 2 \\ 2 & 5 \end{pmatrix}.

(2)

考虑数据点 (xi,yi),i=1,,n(x_i, y_i), i = 1, \dots, n 在二维空间中。相对于 x 轴的方差、相对于 y 轴的方差和协方差分别定义为

σx=1ni=1n(xixˉ)2,σy=1ni=1n(yiyˉ)2,σxy=1ni=1n(xixˉ)(yiyˉ)\sigma_x = \frac{1}{n} \sum_{i=1}^{n} (x_i - \bar{x})^2, \quad \sigma_y = \frac{1}{n} \sum_{i=1}^{n} (y_i - \bar{y})^2, \quad \sigma_{xy} = \frac{1}{n} \sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})

其中 xˉ,yˉ\bar{x}, \bar{y} 分别表示相对于 x 和 y 轴的平均值。

A: 计算方差-协方差矩阵

(σxσxyσxyσy)\begin{pmatrix} \sigma_x & \sigma_{xy} \\ \sigma_{xy} & \sigma_y \end{pmatrix}

对于以下数据点,(2,2),(2,2),(1,1),(1,1)(-2, -2), (2, 2), (1, 1), (-1, 1)

B: 计算方差-协方差矩阵的所有特征值和特征向量。

(3)

证明,如果一个正规矩阵 A 的特征值是 λ1,,λn\lambda_1, \dots, \lambda_n,那么其逆矩阵 A1^{-1} 的特征值是 1/λ1,,1/λn1/\lambda_1, \dots, 1/\lambda_n

Kai

(1)

To find the inverse of the matrix

A=(1225),\mathbf{A} = \begin{pmatrix} 1 & 2 \\ 2 & 5 \end{pmatrix},

we use the formula for the inverse of a 2×22 \times 2 matrix:

A1=1det(A)(dbca),\mathbf{A}^{-1} = \frac{1}{\det(\mathbf{A})} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix},

where A=(abcd)\mathbf{A} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} and det(A)=adbc\det(\mathbf{A}) = ad - bc.

For our matrix,

a=1,b=2,c=2,d=5.a = 1, \quad b = 2, \quad c = 2, \quad d = 5.

First, compute the determinant:

det(A)=(15)(22)=54=1.\det(\mathbf{A}) = (1 \cdot 5) - (2 \cdot 2) = 5 - 4 = 1.

Then, the inverse is

A1=11(5221)=(5221).\mathbf{A}^{-1} = \frac{1}{1} \begin{pmatrix} 5 & -2 \\ -2 & 1 \end{pmatrix} = \begin{pmatrix} 5 & -2 \\ -2 & 1 \end{pmatrix}.

(2)

A: Variance-Covariance Matrix

Given data points (2,2),(2,2),(1,1),(1,1)(-2, -2), (2, 2), (1, -1), (-1, 1), we first compute the mean values:

xˉ=2+2+114=0,yˉ=2+21+14=0.\bar{x} = \frac{-2 + 2 + 1 - 1}{4} = 0, \quad \bar{y} = \frac{-2 + 2 - 1 + 1}{4} = 0.

Next, we compute the variances and covariances:

σxx=14i=14(xixˉ)2=14[(2)2+(2)2+(1)2+(1)2]=104=2.5,\sigma_{xx} = \frac{1}{4} \sum_{i=1}^4 (x_i - \bar{x})^2 = \frac{1}{4} [(2)^2 + (2)^2 + (1)^2 + (1)^2] = \frac{10}{4} = 2.5,
σyy=14i=14(yiyˉ)2=14[(2)2+(2)2+(1)2+(1)2]=104=2.5,\sigma_{yy} = \frac{1}{4} \sum_{i=1}^4 (y_i - \bar{y})^2 = \frac{1}{4} [(2)^2 + (2)^2 + (1)^2 + (1)^2] = \frac{10}{4} = 2.5,
σxy=14i=14(xixˉ)(yiyˉ)=14[(2)(2)+(2)(2)+(1)(1)+(1)(1)]=64=1.5.\sigma_{xy} = \frac{1}{4} \sum_{i=1}^4 (x_i - \bar{x})(y_i - \bar{y}) = \frac{1}{4} [(-2)(-2) + (2)(2) + (1)(-1) + (-1)(1)] = \frac{6}{4} = 1.5.

Thus, the variance-covariance matrix is:

C=(2.51.51.52.5).\mathbf{C} = \begin{pmatrix} 2.5 & 1.5 \\ 1.5 & 2.5 \end{pmatrix}.

B: Eigenvalues and Eigenvectors

To find the eigenvalues λ\lambda of C\mathbf{C}, solve the characteristic equation:

det(CλI)=0.\det(\mathbf{C} - \lambda \mathbf{I}) = 0.

For our matrix C\mathbf{C},

CλI=(2.5λ1.51.52.5λ),\mathbf{C} - \lambda \mathbf{I} = \begin{pmatrix} 2.5 - \lambda & 1.5 \\ 1.5 & 2.5 - \lambda \end{pmatrix},

the determinant is:

det(CλI)=(2.5λ)(2.5λ)(1.5)(1.5)=λ25λ+4=0.\det(\mathbf{C} - \lambda \mathbf{I}) = (2.5 - \lambda)(2.5 - \lambda) - (1.5)(1.5) = \lambda^2 - 5\lambda + 4 = 0.

Solving for λ\lambda, we get:

λ25λ+4=0    (λ4)(λ1)=0    λ1=4,λ2=1.\lambda^2 - 5\lambda + 4 = 0 \implies (\lambda - 4)(\lambda - 1) = 0 \implies \lambda_1 = 4, \quad \lambda_2 = 1.

To find the eigenvectors corresponding to the eigenvalues λ1=4\lambda_1 = 4 and λ2=1\lambda_2 = 1, we solve the equation (CλI)v=0(\mathbf{C} - \lambda \mathbf{I})\mathbf{v} = \mathbf{0}.

For λ1=4\lambda_1 = 4
C4I=(2.541.51.52.54)=(1.51.51.51.5).\mathbf{C} - 4\mathbf{I} = \begin{pmatrix} 2.5 - 4 & 1.5 \\ 1.5 & 2.5 - 4 \end{pmatrix} = \begin{pmatrix} -1.5 & 1.5 \\ 1.5 & -1.5 \end{pmatrix}.

The equation (C4I)v=0(\mathbf{C} - 4\mathbf{I})\mathbf{v} = \mathbf{0} becomes:

(1.51.51.51.5)(v1v2)=(00).\begin{pmatrix} -1.5 & 1.5 \\ 1.5 & -1.5 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}.

This gives us the system of equations:

1.5v1+1.5v2=0,1.5v11.5v2=0.-1.5v_1 + 1.5v_2 = 0, \\ 1.5v_1 - 1.5v_2 = 0.

From the first equation, we obtain v1=v2v_1 = v_2. Therefore, an eigenvector corresponding to λ1=4\lambda_1 = 4 is:

v1=(11).\mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}.
For λ2=1\lambda_2 = 1
C1I=(2.511.51.52.51)=(1.51.51.51.5).\mathbf{C} - 1\mathbf{I} = \begin{pmatrix} 2.5 - 1 & 1.5 \\ 1.5 & 2.5 - 1 \end{pmatrix} = \begin{pmatrix} 1.5 & 1.5 \\ 1.5 & 1.5 \end{pmatrix}.

The equation (C1I)v=0(\mathbf{C} - 1\mathbf{I})\mathbf{v} = \mathbf{0} becomes:

(1.51.51.51.5)(v1v2)=(00).\begin{pmatrix} 1.5 & 1.5 \\ 1.5 & 1.5 \end{pmatrix} \begin{pmatrix} v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}.

This gives us the system of equations:

1.5v1+1.5v2=0,1.5v1+1.5v2=0.1.5v_1 + 1.5v_2 = 0, \\ 1.5v_1 + 1.5v_2 = 0.

From the first equation, we obtain v1=v2v_1 = -v_2. Therefore, an eigenvector corresponding to λ2=1\lambda_2 = 1 is:

v2=(11).\mathbf{v}_2 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}.

Thus, the eigenvectors corresponding to the eigenvalues λ1=4\lambda_1 = 4 and λ2=1\lambda_2 = 1 are v1=(11)\mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix} and v2=(11)\mathbf{v}_2 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}, respectively.

(3)

Let A\mathbf{A} be a regular matrix with eigenvalues λ1,λ2,,λn\lambda_1, \lambda_2, \ldots, \lambda_n and corresponding eigenvectors v1,v2,,vn\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_n. By definition, we have:

Avi=λivi    A1Avi=A1(λivi)    vi=λiA1vi    A1vi=1λivi.\mathbf{A} \mathbf{v}_i = \lambda_i \mathbf{v}_i \implies \mathbf{A}^{-1} \mathbf{A} \mathbf{v}_i = \mathbf{A}^{-1} (\lambda_i \mathbf{v}_i) \implies \mathbf{v}_i = \lambda_i \mathbf{A}^{-1} \mathbf{v}_i \implies \mathbf{A}^{-1} \mathbf{v}_i = \frac{1}{\lambda_i} \mathbf{v}_i.

Thus, the eigenvalues of A1\mathbf{A}^{-1} are 1λi\frac{1}{\lambda_i} for i=1,2,,ni = 1, 2, \ldots, n.

Knowledge

矩阵逆 方差协方差矩阵 特征值和特征向量

解题技巧和信息

  1. 计算逆矩阵时,确保熟记 2×22 \times 2 矩阵的逆矩阵公式。
  2. 计算方差-协方差矩阵时,需准确计算均值、方差和协方差。
  3. 找特征值和特征向量时,熟悉特征值方程和特征向量的计算方法。
  4. 证明部分注意利用特征值和特征向量的定义和性质。

重点词汇

  • Inverse matrix: 逆矩阵
  • Variance-Covariance matrix: 方差-协方差矩阵
  • Eigenvalue: 特征值
  • Eigenvector: 特征向量

参考资料

  1. Gilbert Strang, Linear Algebra and Its Applications, Chapter 3.
  2. Axler, Sheldon, Linear Algebra Done Right, Chapter 5.