# 矩阵起源于方程组，因此也可以借助方程组的思想解题

## 一、题目

\begin{aligned} \boldsymbol{A} & = \begin{bmatrix} 0 & 1 & 0 \\ – 1 & -1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \\ \\ \boldsymbol{B} & = \begin{bmatrix} 1 & – 1 \\ 2 & 0 \\ 3 & 1 \end{bmatrix} \end{aligned}

## 二、解析

### 方法一：使用逆矩阵解题

\begin{aligned} & \boldsymbol{K} – \boldsymbol{AK} = B \\ \Rightarrow & \boldsymbol{EK} – \boldsymbol{AK} = B \\ \Rightarrow & \left( \boldsymbol{E} – \boldsymbol{A} \right) \boldsymbol{K} = \boldsymbol{B} \\ \Rightarrow & \boldsymbol{K} = \left( \boldsymbol{E} – \boldsymbol{A} \right) ^{-1} \boldsymbol{B} \end{aligned}

\begin{aligned} \boldsymbol{E} – \boldsymbol{A} \\ \\ & = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} – \begin{bmatrix} 0 & 1 & 0 \\ – 1 & -1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \\ \\ & = \begin{bmatrix} 1 & -1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & -1 \end{bmatrix} \end{aligned}

\begin{aligned} \begin{vmatrix} \boldsymbol{E} – \boldsymbol{A} \end{vmatrix} \\ & = -2-1 \\ & =-3 \\ & \neq 0 \end{aligned}

$$\boldsymbol{K} = \left( \boldsymbol{E} – \boldsymbol{A} \right) ^{-1} \boldsymbol{B}$$

\begin{aligned} & (\boldsymbol{E} – \boldsymbol{A} \vdots E) \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 & 0 & 0 \\ 1 & 2 & 0 & \vdots & 0 & 1 & 0 \\ 0 & 0 & -1 & \vdots & 0 & 0 & 1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 & 0 & 0 \\ 0 & 3 & 0 & \vdots & -1 & 1 & 0 \\ 0 & 0 & -1 & \vdots & 0 & 0 & 1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 & 0 & 0 \\ 0 & 3 & 0 & \vdots & -1 & 1 & 0 \\ 0 & 0 & 1 & \vdots & 0 & 0 & -1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 & 0 & 0 \\ 0 & 1 & 0 & \vdots & \frac{-1}{3} & \frac{1}{3} & 0 \\ 0 & 0 & 1 & \vdots & 0 & 0 & -1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & 0 & 0 & \vdots & \frac{2}{3} & \frac{1}{3} & 0 \\ 0 & 1 & 0 & \vdots & \frac{-1}{3} & \frac{1}{3} & 0 \\ 0 & 0 & 1 & \vdots & 0 & 0 & -1 \end{bmatrix} \\ \\ \end{aligned}

$$(\boldsymbol{E} – \boldsymbol{A})^{-1} = \begin{bmatrix} \frac{2}{3} & \frac{1}{3} & 0 \\ \\ \frac{-1}{3} & \frac{1}{3} & 0 \\ \\ 0 & 0 & -1 \end{bmatrix}$$

\begin{aligned} & \boldsymbol{K} \\ \\ = & \left( \boldsymbol{E} – \boldsymbol{A} \right) ^{-1} \boldsymbol{B} \\ \\ \Rightarrow & \begin{bmatrix} \frac{2}{3} & \frac{1}{3} & 0 \\ \\ \frac{-1}{3} & \frac{1}{3} & 0 \\ \\ 0 & 0 & -1 \end{bmatrix} \begin{bmatrix} 1 & – 1 \\ 2 & 0 \\ 3 & 1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} \frac{4}{3} & \frac{-2}{3} \\ \\ \frac{1}{3} & \frac{1}{3} \\ \\ -3 & -1 \end{bmatrix} \end{aligned}

$$\textcolor{springgreen}{ \boldsymbol{K} = ( \boldsymbol{\alpha_{1}}, \boldsymbol{\alpha_{2}} ) = \begin{bmatrix} \frac{4}{3} & \frac{-2}{3} \\ \\ \frac{1}{3} & \frac{1}{3} \\ \\ -3 & -1 \end{bmatrix} }$$

### 方法二：使用方程组解题

\begin{aligned} & \boldsymbol{K} = \boldsymbol{A K} + \boldsymbol{B} \\ \\ \Rightarrow & \boldsymbol{K} – \boldsymbol{AK} = \boldsymbol{B} \\ \\ \Rightarrow & (\boldsymbol{E} – \boldsymbol{A}) \boldsymbol{K} = \boldsymbol{B} \end{aligned}

\begin{aligned} \boldsymbol{K} & = (\boldsymbol{\alpha_{1}}, \boldsymbol{\alpha_{2}}) \\ \boldsymbol{B} & = (\boldsymbol{\beta_{1}}, \boldsymbol{\beta_{2}}) \end{aligned}

\begin{aligned} (\boldsymbol{E} – \boldsymbol{A}) \boldsymbol{\alpha_{1}} & = \boldsymbol{\beta_{1}} \\ (\boldsymbol{E} – \boldsymbol{A}) \boldsymbol{\alpha_{2}} & = \boldsymbol{\beta_{2}} \end{aligned}

$$\boldsymbol{E} – \boldsymbol{A} = \begin{bmatrix} 1 & -1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$

\begin{aligned} & (\boldsymbol{E} – \boldsymbol{A}) \boldsymbol{\alpha_{1}} = \boldsymbol{\beta_{1}} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & -1 \end{bmatrix} \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} \end{aligned}

\begin{aligned} & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 \\ 1 & 2 & 0 & \vdots & 2 \\ 0 & 0 & -1 & \vdots & 3 \end{bmatrix} \\ \\ = & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 \\ 0 & 3 & 0 & \vdots & 1 \\ 0 & 0 & -1 & \vdots & 3 \end{bmatrix} \\ \\ = & \begin{bmatrix} 1 & -1 & 0 & \vdots & 1 \\ 0 & 1 & 0 & \vdots & \frac{1}{3} \\ 0 & 0 & 1 & \vdots & -3 \end{bmatrix} \\ \\ = & \begin{bmatrix} \textcolor{black}{\colorbox{pink}{1}} & 0 & 0 & \vdots & \textcolor{springgreen}{\frac{4}{3}} \\ 0 & \textcolor{black}{\colorbox{pink}{1}} & 0 & \vdots & \textcolor{springgreen}{\frac{1}{3}} \\ 0 & 0 & \textcolor{black}{\colorbox{pink}{1}} & \vdots & \textcolor{springgreen}{-3} \end{bmatrix} \end{aligned}

$$\textcolor{springgreen}{ \boldsymbol{\alpha_{1}} = \begin{bmatrix} \frac{4}{3} \\ \\ \frac{1}{3} \\ \\ -3 \end{bmatrix} }$$

\begin{aligned} & (\boldsymbol{E} – \boldsymbol{A}) \boldsymbol{\alpha_{2}} = \boldsymbol{\beta_{2}} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 \\ 1 & 2 & 0 \\ 0 & 0 & -1 \end{bmatrix} \begin{bmatrix} y_{1} \\ y_{2} \\ y_{3} \end{bmatrix} = \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix} \end{aligned}

\begin{aligned} & \begin{bmatrix} 1 & -1 & 0 & \vdots & -1 \\ 1 & 2 & 0 & \vdots & 0 \\ 0 & 0 & -1 & \vdots & 1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & -1 \\ 0 & 3 & 0 & \vdots & 1 \\ 0 & 0 & -1 & \vdots & 1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & -1 \\ 0 & 3 & 0 & \vdots & 1 \\ 0 & 0 & 1 & \vdots & -1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} 1 & -1 & 0 & \vdots & -1 \\ 0 & 1 & 0 & \vdots & \frac{1}{3} \\ 0 & 0 & 1 & \vdots & -1 \end{bmatrix} \\ \\ \Rightarrow & \begin{bmatrix} \textcolor{black}{\colorbox{pink}{1}} & 0 & 0 & \vdots & \textcolor{springgreen}{\frac{-2}{3}} \\ 0 & \textcolor{black}{\colorbox{pink}{1}} & 0 & \vdots & \textcolor{springgreen}{\frac{1}{3}} \\ 0 & 0 & \textcolor{black}{\colorbox{pink}{1}} & \vdots & \textcolor{springgreen}{-1} \end{bmatrix} \end{aligned}

$$\textcolor{springgreen}{ \boldsymbol{\alpha_{2}} = \begin{bmatrix} \frac{-2}{3} \\ \\ \frac{1}{3} \\ \\ -1 \end{bmatrix} }$$

$$\textcolor{springgreen}{ \boldsymbol{K} = ( \boldsymbol{\alpha_{1}}, \boldsymbol{\alpha_{2}} ) = \begin{bmatrix} \frac{4}{3} & \frac{-2}{3} \\ \\ \frac{1}{3} & \frac{1}{3} \\ \\ -3 & -1 \end{bmatrix} }$$