AoZai
AoZai

Reading Notice

These are personal study and translation notes for reference only; the original course materials belong to MIT OpenCourseWare and their respective rights holders.

ZoomNotes for Linear Algebra

Gilbert Strang, MIT 18.06 · Ch.2 / 11

Part 2: Solving Linear Equations Ax=bAx = b : AA is n×nn \times n

2.1 Inverse Matrices A1A^{-1} and Solutions x=A1bx = A^{-1}b

If AA is a square invertible matrix, there exists A1A^{-1} such that:

A1A=IandAA1=IA^{-1}A = I \quad \text{and} \quad AA^{-1} = I

The solution to Ax=bAx = b is then:

x=A1bx = A^{-1}b

2x2 Inverse Formula:

[abcd]1=1adbc[dbca]\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}

Here adbcad-bc is the determinant. If the determinant is zero, the matrix is singular (not invertible).

Conditions for Invertibility (all equivalent):

  • Independent rows and independent columns
  • Nonzero determinant
  • No zero pivots during elimination
  • Ax=0Ax = 0 implies x=0x = 0
  • Full rank (r=nr = n)

Inverse of a Product:

(AB)1=B1A1(AB)^{-1} = B^{-1} A^{-1}

Note the reverse order: the inverse of a product is the product of inverses in reverse order.


2.2 Triangular Matrix and Back Substitution for Ux=cUx = c

An upper triangular matrix UU has zeros below the diagonal:

U=[u11u12u1n0u22u2n00unn]U = \begin{bmatrix} u_{11} & u_{12} & \cdots & u_{1n} \\ 0 & u_{22} & \cdots & u_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & u_{nn} \end{bmatrix}

Back Substitution solves Ux=cUx = c starting from the last equation:

xn=cnunn,xn1=cn1un1,nxnun1,n1,x_n = \frac{c_n}{u_{nn}}, \quad x_{n-1} = \frac{c_{n-1} - u_{n-1,n}x_n}{u_{n-1,n-1}}, \quad \dots

In general, for i=n,n1,,1i = n, n-1, \dots, 1:

xi=cij=i+1nuijxjuiix_i = \frac{c_i - \sum_{j=i+1}^n u_{ij} x_j}{u_{ii}}

The pivots u11,u22,,unnu_{11}, u_{22}, \dots, u_{nn} must all be nonzero. A zero pivot means the system is singular (no unique solution).


2.3 Elimination: Square Matrix AA to Triangular UU

Gaussian elimination transforms AA into an upper triangular matrix UU by subtracting multiples of rows from rows below.

The augmented matrix [Ab][A \mid b] is carried to [Uc][U \mid c] simultaneously.

Step-by-step for a 3x3 example:

  1. Use row 1 (the pivot row) to eliminate the first entries of rows 2 and 3.
  2. Use row 2 to eliminate the second entry of row 3.
  3. The result is UU, an upper triangular matrix.

The multiplier ij\ell_{ij} is:

ij=entry to eliminatepivot\ell_{ij} = \frac{\text{entry to eliminate}}{\text{pivot}}

Row ii \leftarrow Row ii ij×- \ell_{ij} \times Row jj

Pivots must be nonzero. If a pivot is zero, we attempt a row exchange. If all eligible rows have zero in the pivot position, the matrix is singular.


2.4 Row Exchanges for Nonzero Pivots: Permutation PP

A permutation matrix PP has the rows of the identity matrix II in any order. There are n!n! permutation matrices of size n×nn \times n.

Properties:

  • P1=PTP^{-1} = P^T (permutation matrices are orthogonal)
  • Multiplying PAPA reorders the rows of AA
  • PP times a column vector reorders its entries

Example: The permutation that swaps rows 1 and 3:

P=[001010100]P = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}

When a zero pivot is encountered during elimination, we exchange the current row with a lower row that has a nonzero entry in the pivot column. This means PA=LUPA = LU, where PP encodes all the row swaps performed.


2.5 Elimination with No Row Exchanges: Why is A=LUA = LU?

When no row exchanges are needed, elimination factors AA into:

A=LUA = L U
  • LL is lower triangular with 1's on the diagonal
  • UU is upper triangular (the result of elimination)

Where do LL and UU come from?

Each elimination step subtracts ij×\ell_{ij} \times (pivot row jj) from row ii. This is equivalent to multiplying AA on the left by an elementary elimination matrix EijE_{ij}. The product of all EijE_{ij} gives UU:

En,n1E31E21A=UE_{n,n-1} \cdots E_{31} E_{21} A = U

Then A=(E211E311En,n11)U=LUA = (E_{21}^{-1} E_{31}^{-1} \cdots E_{n,n-1}^{-1}) U = L U.

The entries of LL below the diagonal are the multipliers ij\ell_{ij} themselves. The diagonal entries of LL are 1's.

Column-Row Multiplication View: A=LUA = LU can also be seen as accumulating rank-one updates. Each step removes a rank-one matrix: (column jj of LL) ×\times (row jj of UU).


2.6 Transposes / Symmetric Matrices / Dot Products

Transpose: The transpose ATA^T has entries (AT)ij=Aji(A^T)_{ij} = A_{ji}. Rows become columns and vice versa.

Transpose Rules:

(A+B)T=AT+BT,(AB)T=BTAT,(A1)T=(AT)1(A + B)^T = A^T + B^T, \quad (AB)^T = B^T A^T, \quad (A^{-1})^T = (A^T)^{-1}

Symmetric Matrices: S=STS = S^T. For any matrix AA, the products ATAA^T A and AATA A^T are always symmetric:

(ATA)T=AT(AT)T=ATA(A^T A)^T = A^T (A^T)^T = A^T A

Dot Product as xTyx^T y: The dot product xy=xTy=xiyix \cdot y = x^T y = \sum x_i y_i. This notation appears throughout linear algebra in applications involving work (forceTdistance\text{force}^T \cdot \text{distance}), income (pricesTquantities\text{prices}^T \cdot \text{quantities}), and heat (temperaturesTentropy\text{temperatures}^T \cdot \text{entropy}).

LDLTLDL^T Factorization for Symmetric SS: When SS is symmetric and elimination proceeds without row exchanges, we can write:

S=LDLTS = L D L^T

where DD is diagonal containing the pivots from UU, and LL is lower triangular with 1's on the diagonal. This is a refinement of LULU that exploits symmetry, reducing storage and computation by roughly half.

Previous Next
© MIT OpenCourseWare  |  18.06 Linear Algebra  |  Gilbert Strang  |  Spring 2010
ocw.mit.edu  ·  CC BY-NC-SA 4.0