## 矩阵加减

2A 等于：

$2 \mathrm{A}=\left(\begin{array}{ll}{1 \times 2} & {3 \times 2} \\ {2 \times 2} & {4 \times 2} \\ {5 \times 2} & {6 \times 2}\end{array}\right)=\left(\begin{array}{cc}{2} & {6} \\ {4} & {8} \\ {10} & {12}\end{array}\right)$

3B 等于

$3 B=\left(\begin{array}{cc}{7 \times 3} & {8 \times 3} \\ {9 \times 3} & {10 \times 3} \\ {11 \times 3} & {12 \times 3}\end{array}\right)=\left(\begin{array}{cc}{21} & {24} \\ {27} & {30} \\ {33} & {36}\end{array}\right)$

$2 A+3 B=\left(\begin{array}{ll}{2+21} & {6+24} \\ {4+27} & {8+30} \\ {10+33} & {12+36}\end{array}\right)=\left(\begin{array}{cc}{23} & {30} \\ {31} & {38} \\ {43} & {48}\end{array}\right)$

## 矩阵相乘

$A \times B=\left(\begin{array}{ll}{1} & {3} \\ {2} & {4} \\ {5} & {6}\end{array}\right) \times\left(\begin{array}{ccc}{7} & {8} & {9} \\ {10} & {11} & {12}\end{array}\right)$

$=\left(\begin{array}{lll}{1 \times 7+3 \times 10} & {1 \times 8+3 \times 11} & {1 \times 9+3 \times 12} \\ {2 \times 7+4 \times 10} & {2 \times 8+4 \times 11} & {2 \times 9+4 \times 12} \\ {5 \times 7+6 \times 10} & {5 \times 8+6 \times 11} & {5 \times 9+6 \times 12}\end{array}\right)$

$=\left(\begin{array}{ccc}{37} & {41} & {45} \\ {54} & {60} & {66} \\ {95} & {106} & {117}\end{array}\right)$

$A^{2} B-2 A B=\left(A^{2}-2 A\right) \cdot B$

## 矩阵特殊情况

1. 零矩阵 $\left(\begin{array}{lll}{0} & {0} & {0} \\ {0} & {0} & {0} \\ {0} & {0} & {0}\end{array}\right)=0$，乘于任何数都是 0

$A \cdot 0=0 \quad 0 \cdot A=0$

1. E 矩阵
下面的矩阵，我们称为 E：
$\left(\begin{array}{lll}{1} & {0} & {0} \\ {0} & {1} & {0} \\ {0} & {0} & {1}\end{array}\right)=E \quad\left(\begin{array}{llll}{1} & {0} & {0} & {0} \\ {0} & {1} & {0} & {0} \\ {0} & {0} & {1} & {0} \\ {0} & {0} & {0} & {1}\end{array}\right)=E$
E的行列数，取决于和它配合的矩阵的行列数。例如当 E 加上一个矩阵时，E 的行列数等于加上矩阵的行列数：
$E+\left(\begin{array}{lll}{1} & {2} & {3} \\ {4} & {5} & {6} \\ {7} & {8} & {9}\end{array}\right)$
此时 E 就是三行三列：$\left(\begin{array}{lll}{1} & {0} & {0} \\ {0} & {1} & {0} \\ {0} & {0} & {1}\end{array}\right)$
任何矩阵乘于 E 等于矩阵本身，E 乘于任何矩阵也等于矩阵本身：

$A \cdot E=A \quad E \cdot A=A$

$\mathrm{E}^{2}=\mathrm{E} \cdot \mathrm{E}=\mathrm{E}$

1. 矩阵相乘时，$AB$$BA$ 未必相等
所以，正确的：$A^{2} B-2 A B=\left(A^{2}-2 A\right) \cdot B$，错误的：$A^{2} B-2 A B=B\left(A^{2}-2 A\right)$

2. $AX = AY$ 不能推出 $X = Y$
矩阵是没有除法的

3. $(\mathrm{AB})^{\mathrm{k}}$$A^{k} B^{k}$ 不一定相等

4. $A^{2}+(k+j) A B+k j B^{2}$$(A+k B)(A+j B)$ 不一定相等
例如，下面式子是错误的：$A^{2}+2 A B+B^{2}=(A+B)^{2}$，它俩不一定相等。
但是，如果是 E，那么等式是成立的，比如：

$A^{2}+2 A E+E^{2}=(A+E)^{2}$

$A^{2}+2 A+E=A^{2}+2 A E+E^{2}=(A+E)^{2}$

## 矩阵取行列式

$|A|=\left|\begin{array}{lll}{1} & {2} & {3} \\ {2} & {3} & {4} \\ {4} & {5} & {7}\end{array}\right|=-1$

### 公式：$|\lambda A|=\lambda^{n}|A|$

$A=2\left(\begin{array}{lll}{1} & {2} & {3} \\ {2} & {3} & {4} \\ {4} & {5} & {7}\end{array}\right)$

\begin{aligned}|A| &=2^{3}\left|\begin{array}{ccc}{1} & {2} & {3} \\ {2} & {3} & {4} \\ {4} & {5} & {7}\end{array}\right| \\ &=8 \times(-1) \\ &=-8 \end{aligned}

## 转置矩阵

$A=\left(\begin{array}{lll}{1} & {0} & {1}\end{array}\right) \Longrightarrow A^{T}=\left(\begin{array}{l}{1} \\ {0} \\ {1}\end{array}\right)$

\begin{aligned} A^{T} A A^{T} &=\left(\begin{array}{l}{1} \\ {0} \\ {1}\end{array}\right) \cdot\left(\begin{array}{lll}{1} & {0} & {1}\end{array}\right) \cdot\left(\begin{array}{l}{1} \\ {0} \\ {1}\end{array}\right) \\ &=\left(\begin{array}{lll}{1} & {0} & {1} \\ {0} & {0} & {0} \\ {1} & {0} & {1}\end{array}\right) \cdot\left(\begin{array}{l}{1} \\ {0} \\ {1}\end{array}\right)=\left(\begin{array}{l}{2} \\ {0} \\ {2}\end{array}\right) \end{aligned}

## 逆矩阵

### 证明矩阵可逆

• 矩阵 A 为方阵（行数与列数相等）
• $|A| \neq 0$） 或者 （存在一个方阵 B 满足 AB = E 或 BA = E）

$|A|=\left|\begin{array}{lll}{1} & {2} & {3} \\ {0} & {4} & {5} \\ {0} & {0} & {6}\end{array}\right|=24 \neq 0$

A 为方阵，且行列式不为 0，所以 A 可逆。

$\begin{array}{l}{A^{2}-A-2 E=0} \\ {A^{2}-A=2 E} \\ {A^{2}-A E=2 E} \\ {A(A-E)=2 E} \\ {A\left[\frac{1}{2}(A-E)\right]=E}\end{array}$

### 求逆矩阵

$\left(A \vdots E\right) \Longrightarrow \left(E \vdots A^{-1}\right)$

• 换行
• 某行乘上一个数字
• 一行加上或减去另一行乘数字

$\left(\begin{array}{lll|lll}{1} & {2} & {3} & {1} & {0} & {0} \\ {2} & {3} & {4} & {0} & {1} & {0} \\ {4} & {5} & {7} & {0} & {0} & {1}\end{array}\right)$

$\left(\begin{array}{lll|ccc}{1} & {0} & {0} & {-1} & {-1} & {1} \\ {0} & {1} & {0} & {-2} & {5} & {-2} \\ {0} & {0} & {1} & {2} & {-3} & {1}\end{array}\right)$

$A^{-1}=\left(\begin{array}{ccc}{-1} & {-1} & {1} \\ {-2} & {5} & {-2} \\ {2} & {-3} & {1}\end{array}\right)$

### 利用 $A \cdot A^{-1}=E$ 或 $A^{-1} \cdot A=E$ 计算

$A X B=C$ 转换，可以得到：

\begin{array}{l}{\qquad A X B=C} \\ {A^{-1} A X B=A^{-1} C} \\ {\begin{aligned} E X B &=A^{-1} C \\ X B &=A^{-1} C \\ X B &=A^{-1} C \\ X B B^{-1} &=A^{-1} C B^{-1} \\ X B &=A^{-1} C B^{-1} \end{aligned}} \\ {X=A^{-1} C B^{-1}=\left(\begin{array}{ccc}{-1} & {-1} & {1} \\ {-2} & {5} & {-2} \\ {2} & {-3} & {1}\end{array}\right)\left(\begin{array}{ll}{1} & {4} \\ {2} & {5} \\ {3} & {6}\end{array}\right)\left(\begin{array}{cc}{-\frac{1}{3}} & {\frac{2}{3}} \\ {\frac{2}{3}} & {-\frac{1}{3}}\end{array}\right)}\end{array}

## 伴随矩阵

### 利用 $A^{*} \cdot A=|A| E$ 或 $A \cdot A^{*}=|A| E$ 计算

\begin{aligned} A^{*} X &=A^{-1}+X \\ A A^{*} X &=A\left(A^{-1}+X\right) \\|A| E X &=A\left(A^{-1}+X\right) \\|A| E X &=A A^{-1}+A X \\|A| E X &=E+A X \\|A| E X &=E+A X \\|A| E X &=E \\(|A| E-A) X &=E \\(|A| E-A)^{-1} \cdot(|A| E-A) X &=(|A| E-A)^{-1} \cdot E \\ E X &=(|A| E-A)^{-1} \cdot E^{\prime} \\ X &=(|A| E-A)^{-1} \end{aligned}

## 矩阵的秩

### 求矩阵的秩

$\left(\begin{array}{cccc}{1} & {2} & {3} & {4} \\ {0} & {-3} & {-6} & {-9} \\ {0} & {0} & {3} & {5} \\ {0} & {0} & {0} & {0}\end{array}\right)$

### 已知矩阵的秩，求矩阵里的未知数

$\left(\begin{array}{cccc}{1} & {2} & {3} & {4} \\ {0} & {\mu-4} & {0} & {0} \\ {0} & {0} & {0} & {\lambda-12}\end{array}\right)$

$R(B)=1 \longrightarrow\left\{\begin{array}{c}{\mu-4=0} \\ {\lambda-12=0}\end{array} \rightarrow\left\{\begin{array}{l}{\mu=4} \\ {\lambda=12}\end{array}\right.\right.$

## 总结

### 公式表

AB 和 BA 未必相等
X=AY 不能推出 X = Y
$A^{2}+(k+j) A B+k j B^{2}$$(A+k B)(A+j B)$ 不一定相等，但 $A^{2}+(k+j) A+k j E=A^{2}+(k+j) A E+k j E^{2}=(A+k E)(A+j E)$
$\vert \lambda A \vert = \lambda^{n} \vert A\vert$
$(A B)^{T}=B^{T} A^{T}$
$\left \vert A^{T}\right \vert=\vert A \vert$