2. Solving Linear Equations
2.1 Linear Equations Picture
Row Picture
2 by 2 equations
Two equations, Two unknowns
\]
The row picture shows two lines meeting at a single point(the solution).

3 by 3 equations
Three equations, Three unknowns
\]
The row picture shows three planes meeting at a single point.

Column Picture
2 by 2 equations
Two equations, Two unknowns
\]
The column picture combines the column vectors on the left side to produce the vector b on the right side.
(The left side of the vector equation is a linear combination of the columns)

3 by 3 equations
Three equations, Three unknowns
\]
The column picture combines three columns to produce b,the coefficients (x,y,z) = (0,0,2).

2.2 Elimination
2.2.1 Gaussian Elimination
- Column 1 : Use the first equation to create zeros below the first pivot.
- Column 2 : Use the new equation 2 to create zeros below the second pivot.
- Column 3 to n : Keep going to find all n pivots and the upper triangular U.
2 by 2
Multiply equation 1 by 3, and Subtract from equation 2.
\]

3 by 3
\]
Elimination Steps
step1 : Subtract 2 times equation 1 from equation 2.
\quad \quad \quad y + z = 4 \\
-2x-3y+7z=10 \end{matrix}
\]
step2 : Subtract -1 times equation 1 from equation 3.
\quad \quad \quad y + z = 4 \\
\quad \quad \quad \quad y+5z=12 \end{matrix}
\]
step3 : Subtract new equation 2 from new equation 3.
\quad \quad \quad \quad y + z = 4 \\
\quad \quad \quad \quad \quad 4z = 8 \end{matrix}
==>Ux = c
\]
U is upper triangular.
Back substitution
z = 2 --> y = 2 --> x = -1
2.2.2 Elimination-Matrix
Elimination multiplies Ax=b by \(E_{21} , E_{31} , E_{41}, ..., E_{n1}\), then \(E_{32} , E_{42}, ..., E_{n2}\) and onward.
- \(E =E_{21} ,..., E_{n1},..., E_{n2},...,E_{n(n-1)}\) , \(EA = [Ea_1...Ea_n]\)
- Augmented matrix : \(E[A\ \ b] = [EA\ \ Eb]\)
example:
\Downarrow \\
\begin{matrix} 2x_1 + 4x_2 - 2x_3 = 2 \\ 4x_1 + 9x_2 - 3x_3 = 8 \\ -2x_1-3x_2+7x_3=10 \end{matrix} \\
\Downarrow \\
\left[ \begin{matrix} 2&4&-2 \\ 4&9&-3 \\ -2&-3&7 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 2\\8\\10 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 1&0&0 \\ -2&1&0 \\ 0&0&1 \end{matrix} \right]
\left[ \begin{matrix} 2&4&-2 \\ 4&9&-3 \\ -2&-3&7 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 1&0&0 \\ -2&1&0 \\ 0&0&1 \end{matrix} \right]
\left[ \begin{matrix} 2\\8\\10 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 2&4&-2 \\ 0&1&1 \\ -2&-3&7 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 2\\4\\10 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 1&0&0 \\ 0&1&0 \\ 1&0&1 \end{matrix} \right]
\left[ \begin{matrix} 2&4&-2 \\ 0&1&1 \\ -2&-3&7 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 1&0&0 \\ 0&1&0 \\ 1&0&1 \end{matrix} \right]
\left[ \begin{matrix} 2\\4\\10 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 2&4&-2 \\ 0&1&1 \\ 0&1&5 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 2\\4\\12 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 1&0&0 \\ 0&1&0 \\ 0&-1&1 \end{matrix} \right]
\left[ \begin{matrix} 2&4&-2 \\ 0&1&1 \\ 0&1&5 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 1&0&0 \\ 0&1&0 \\ 0&-1&1 \end{matrix} \right]
\left[ \begin{matrix} 2\\4\\12 \end{matrix} \right] \\
\Downarrow \\
\left[ \begin{matrix} 2&4&-2 \\ 0&1&1 \\ 0&0&4 \end{matrix} \right]
\left[ \begin{matrix} x_1\\x_2\\x_3 \end{matrix} \right] =
\left[ \begin{matrix} 2\\4\\8 \end{matrix} \right] \\
\Downarrow Back \ \ substitution \\
x_3 = 2 , x_2 = 2, x_1 = -1
\]
2.3 Rules for Matrix Operations
2.3.1 Matrix Multiplication
Matrices A with n columns multiply matrices B with n rows : \(A_{m \times n} B_{n \times p} = C_{m \times p}\)
The regular way
The entry in row i and column j of AB is (row i of A) \(\cdot\) (column j of B): \((AB)_{ij}=a_{i1}b_{1j} + a_{i2}b_{2j}+...+a_{in}b_{nj}\)
\left[ \begin{matrix} *&b_{1j}&*&*\\ &b_{2j}&&\ \\ &\vdots&& \\ &b_{nj}&& \end{matrix} \right]=
\left[ \begin{matrix} &&*&& \\ *&*&(AB)_{ij}&*&* \\ &&*&& \\&&*&& \end{matrix} \right]
\]
The column way
Each column of AB is a combination of the columns of A.
Matrix A times every column of B : \(A[b_1...b_p]=[Ab_1...Ab_p]\)
The row way
Every row of AB is a combination of the rows of B
Every row of A times matrix B : \(\left[\begin{matrix} a_1 \\ a_2 \\ \vdots \\a_n \end{matrix}\right]B=\left[\begin{matrix} a_1B \\ a_2B \\ \vdots \\a_nB \end{matrix}\right]\)
The columns multiply rows
Multiply columns 1 to n of A times rows 1 to n of B. Add those matrices.
\left[\begin{matrix} row_1&\cdots \\ \vdots&\vdots \\row_n&\cdots \end{matrix}\right]
=(col_1)(row_1)+...+(col_n)(row_n)
\]
Block Multiplication
A and B cut into blocks(which are small matrices).
B = \left[\begin{matrix} B_1&B_2\\ B_3&B_4 \end{matrix}\right] \\
AB =\left[\begin{matrix} A_1&A_2\\ A_3&A_4 \end{matrix}\right]
\left[\begin{matrix} B_1&B_2\\ B_3&B_4 \end{matrix}\right] =
\left[\begin{matrix} A_1B_1 + A_2B_3&A_1B_2 + A_2B_4\\ A_3B_1 + A_4B_3&A_2B_2 + A_4B_4\end{matrix}\right]
\]
2.3.2 The Laws for Matrix Operations
Additions
Commutative law : A + B = B + A
Distributive law : c(A + B) = cA + cB
Associative law : A + (B + C) = (A + B) + C
Multiply
Commutative law is usually broken : \(AB \neq BA\)
Distributive law : (A + B)C = AC + BC or C(A + B) = CA + CB
Associative law : A (B C) = (A B) C
2.4 Inverse Matrices
The matrix A is invertible if there exists a matrix \(A^{-1}\) that "inverts" A :
\]
- A is invertible if and only if it has n pivots (row exchanges allowed).
- If Ax = 0 for a nonzero vector x, then A has no inverse.
- The inverse of AB is the reverse product \(B^{-1}A^{-1}\),and \((ABC)^{-1}=C^{-1}B^{-1}A^{-1}\).
- Diagonally dominant matrices are invertible.Each \(|a_{ii}|\)dominates its row.
Gauss-Jordan Method
\]
example $A = \left[ \begin{matrix} 2&3 \ 4&7 \end{matrix}\right] $:
\Downarrow \\
[U \quad L^{-1}]=\left[ \begin{matrix} 2&3&1&0 \\ 0&1&-2&1 \end{matrix}\right] \quad \\
\Downarrow \\
\left[ \begin{matrix} 2&0&7&-3 \\ 0&1&-2&1 \end{matrix}\right] \\
\Downarrow \\
[I \quad A^{-1}]=\left[ \begin{matrix} 1&0&7/2&-3/2 \\ 0&1&-2&1 \end{matrix}\right] \quad \\
\]
2.5 Factorization : A = LU
Gaussian elimination (with no row exchanges) factors A into L times U,the factors L and U are triangular matrices, and L include all their inverse.
\]
\Downarrow \\
(E_{21}^{-1}E_{31}^{-1}...E_{n(n-1)}^{-1})(E_{n(n-1)}...E_{31}E_{21})A = (E_{21}^{-1}E_{31}^{-1}...E_{n(n-1)}^{-1})U \\
\Downarrow \\
A = LU \\
\]
example \(A = \left[ \begin{matrix} 2&1&0 \\ 1&2&1 \\ 0&1&2 \end{matrix}\right] =
\left[ \begin{matrix} 1&0&0 \\ 1/2&1&0 \\ 0&2/3&1 \end{matrix}\right]
\left[ \begin{matrix} 2&1&0 \\ 0&3/2&1 \\ 0&0&4/3 \end{matrix}\right] = LU\)
The triangular factorization can be written : \(A = LU \rightarrow A=LDU\), that D is a diagonal matrix contains the pivots.
Split U into \(DU=\left[ \begin{matrix} d_1&&& \\ &d_2&& \\ &&\ddots \\ &&&d_n \end{matrix}\right]\left[ \begin{matrix} 1&u_{12}/d_1&u_{13}/d_1&\cdots \\ &1&u_{23}/d_2&\vdots \\ &&\ddots \\ &&&1 \end{matrix}\right]\)
example:
\left[ \begin{matrix} 1&0&0 \\ 1/2&1&0 \\ 0&2/3&1 \end{matrix}\right]
\left[ \begin{matrix} 2&1&0 \\ 0&3/2&1 \\ 0&0&4/3 \end{matrix}\right] \\ =
\left[ \begin{matrix} 1&0&0 \\ 1/2&1&0 \\ 0&2/3&1 \end{matrix}\right]
\left[ \begin{matrix} 2&0&0 \\ 0&3/2&0 \\ 0&0&4/3 \end{matrix}\right]\left[ \begin{matrix} 1&1/2&0 \\ 0&1&2/3 \\ 0&0&1 \end{matrix}\right]= LDU
\]
Keys
- The lower triangular L contains the number \(l_{ij}\) that multiply pivot rows, going from A to U. The product LU adds those rows back to recover A.
- On the right side we solve Lc = b (forward) and Ux=c (backward).
- Cost : the left side costs \(1/3(n^3 -n)\) multiplications and subtractions,the right side costs \(n^2\) multiplications and subtractions.
2.6 Transposes and Permutations
Transposes
The columns of \(A^{T}\) are the rows of A
\]
If \(A = \left [ \begin{matrix} 1&2&3 \\ 0&0&4 \end{matrix}\right]\) then \(A^{T} = \left [ \begin{matrix} 1&0 \\ 2&0 \\ 3&4 \end{matrix}\right]\)
Sum : \((A+B)^{T} = A^{T} + B^{T}\)
Product : \((AB)^{T} = B^{T}A^{T}\)
Inverse : \((A^{T})^{-1} = (A^{-1})^{T}\)
Symmetric matrix (\(S^T=S\)):\(U = L^T \rightarrow S = LDU = LDL^T\)
Permutations
A permutation matrix P has the rows of the identity I in any order, \(P_{ij}\) is constructed by exchanging two row i and j of \(I\),and there are \(n!\) permuataion matrices of order n.
3 by 3 permuation matrices:
P_{21} = \left [ \begin{matrix} &1& \\ 1&& \\ &&1 \end{matrix}\right] \quad
P_{31} = \left [ \begin{matrix} &&1\\ &1& \\ 1&& \end{matrix}\right] \\
P_{32} = \left [ \begin{matrix} 1&&\\ &&1 \\ &1& \end{matrix}\right] \quad
P_{32}P_{21} = \left [ \begin{matrix} &1&\\ &&1 \\ 1&& \end{matrix}\right] \quad
P_{21}P_{32} = \left [ \begin{matrix} &&1\\ 1&& \\ &1& \end{matrix}\right]
\]
- If A is invertible then a permutation P will reorder its rows for PA=LU.
- A permutation matrix P has a 1 in each row and column, and \(P^T = P^{-1}\).
2. Solving Linear Equations的更多相关文章
- Linear Equations
4.1 Linear Equations with One Independent Variable
- Linear Equations in Linear Algebra
Linear System Vector Equations The Matrix Equation Solution Sets of Linear Systems Linear Indenpende ...
- 线性代数导论 | Linear Algebra 课程
搞统计的线性代数和概率论必须精通,最好要能锻炼出直觉,再学机器学习才会事半功倍. 线性代数只推荐Prof. Gilbert Strang的MIT课程,有视频,有教材,有习题,有考试,一套学下来基本就入 ...
- Java基础常见英语词汇
Java基础常见英语词汇(共70个) ['ɔbdʒekt] ['ɔ:rientid]导向的 ['prəʊɡræmɪŋ]编程 OO: object ...
- 看到了必须要Mark啊,最全的编程中英文词汇对照汇总(里面有好几个版本的,每个版本从a到d的顺序排列)
java: 第一章: JDK(Java Development Kit) java开发工具包 JVM(Java Virtual Machine) java虚拟机 Javac 编译命令 java ...
- (转)Awesome Courses
Awesome Courses Introduction There is a lot of hidden treasure lying within university pages scatte ...
- 专业英语词汇(Java)
abstract (关键字) 抽象 ['.bstr.kt] access vt.访问,存取 ['.kses]‘(n.入口, ...
- Lua的各种资源1
Libraries And Bindings LuaDirectory > LuaAddons > LibrariesAndBindings This is a list of l ...
- JAVA常用单词
柠檬学院Java 基础常见英语词汇(共 70 个)OO: object-oriented ,面向对象 OOP: object-oriented programming,面向对象编程JDK:Java d ...
- java常用英语单词
abstract (关键字) 抽象 ['.bstr.kt] access vt.访问,存取 ['.kses]'(n.入口,使用权) algorithm n.算法 ['.lg.riem] annotat ...
随机推荐
- Java 封装性的四种权限测试 + 总结
* 总结封装性:Java提供了4中权限修饰符来修饰类及类的内部结构,体现类及类的内部结构再被调用时的可见性的大小 1 package com.bytezero.circle; 2 3 publi ...
- VC-MFC 登陆界面 + 数据库账号+密码
1 // DlgUser.cpp : 实现文件 2 // 3 4 #include "stdafx.h" 5 #include "Login.h" 6 #inc ...
- php7中的三元运算符的区别
<?php $tmparr = ['cover'=>'http://img.immomo.com.cn']; echo isset($tmparr['cover'])."\n&q ...
- tomcat SSL安全连接配置简介
tomcat中使用https提供服务,配置的方式有两种.生成或购买CA证书时会要求绑定域名.设置密码和证书别名(aliase). tomcat可用的证书列表里用三个文件: 方式一: <Conne ...
- 摆脱鼠标系列 - vscode - 跳转到下一个文件 Ctrl(右边) + PageDown 这个很常用
为什么 摆脱鼠标系列 - vscode - 跳转到下一个文件 Ctrl(右边) + PageDown 这个很常用 右边Ctrl 就可以单手操控了 这个频率很高
- 关闭 nginx | taskkill /f /t /im nginx.exe
stop.bat taskkill /f /t /im nginx.exe pause
- stm32 fatfs 文件系统分析和代码解析
一 文件系统: 文件系统是操作系统用于明确存储设备(常见的是磁盘,也有基于NAND Flash的固态硬盘)或分区上的文件的方法和数据结构:即在存储设备上组织文件的方法.操作系统中负责管理和存储文件信息 ...
- 从一线方案商的角度来看高通QCC3020芯片
写在前面的话 QCC3020的推出已经有一段时间了.在蓝牙音频的圈子里,属于家喻户晓的芯片了.再加上高通的大力宣传和一些顶尖级产品的使用,可以说,它是高通在吸收CSR的技术之后,着力推出的最具竞争 ...
- 观展新体验!3DCAT助力青桔 “未来之见”线上发布会炫酷亮相
在"未来之见"滴滴青桔2021新品发布会现场,青桔推出概念车"青桔X","X"代表了无限可能和憧憬,街边的共享单车?这只是其中一面,青桔为您 ...
- 记录--你不知道的Js高级方法
这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 前言 在Js中有一些比较冷门但是非常好用的方法,我在这里称之为高级方法,这些方法没有被广泛使用或多或少是因为存在一些兼容性的问题,不是所有 ...