2.1 Linear Equations Picture

Row Picture

2 by 2 equations

Two equations, Two unknowns

\[\begin{matrix} x - 2y = 1 \\ 3x + 2y = 11 \end{matrix}
\]

The row picture shows two lines meeting at a single point(the solution).

3 by 3 equations

Three equations, Three unknowns

\[Ax=b \ \ => \ \ \begin{matrix} x + 2y + 3z = 6 \\ 2x + 5y + 2z = 4 \\ 6x - 3y + z = 2\end{matrix}
\]

The row picture shows three planes meeting at a single point.

Column Picture

2 by 2 equations

Two equations, Two unknowns

\[\begin{matrix} x - 2y = 1 \\ 3x + 2y = 11 \end{matrix} =>x\left[ \begin{matrix} 1\\ 3 \\ \end{matrix} \right] + y\left[ \begin{matrix} -2\\ 2 \\ \end{matrix} \right] =\left[\begin{matrix} 1 \\ 11 \end{matrix}\right] = b
\]

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

\[\begin{matrix} x + 2y + 3z = 6 \\ 2x + 5y + 2z = 4 \\ 6x - 3y + z = 2 \end{matrix} =>x\left[ \begin{matrix} 1\\ 2\\6 \\ \end{matrix} \right] + y\left[ \begin{matrix} 2\\ 5 \\-3 \\ \end{matrix} \right] + z\left[ \begin{matrix} 3\\ 2 \\1 \\ \end{matrix} \right] =\left[\begin{matrix} 4 \\ 6 \\ 2\end{matrix}\right] = b
\]

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.

\[(Before) \ \ \begin{matrix} x - 2y = 1 \\ 3x + 2y = 11 \end{matrix} ==> (After) \ \ \begin{matrix} x - 2y = 1 \\ 8y = 8 \end{matrix}
\]

3 by 3
\[Ax = b \ ==> \ \begin{matrix} 2x + 4y - 2z = 2 \\ 4x + 9y - 3z = 8 \\ -2x-3y+7z=10 \end{matrix}
\]

Elimination Steps

step1 : Subtract 2 times equation 1 from equation 2.

\[\begin{matrix} 2x + 4y - 2z = 2 \\
\quad \quad \quad y + z = 4 \\
-2x-3y+7z=10 \end{matrix}
\]

step2 : Subtract -1 times equation 1 from equation 3.

\[\begin{matrix} 2x + 4y - 2z = 2 \\
\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 \begin{matrix} 2x + 4y - 2z = 2 \\
\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:

\[Ax = b \\
\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} * \\ a_{i1}&a_{i2}&...&a_{in} \\ * \\* \end{matrix} \right]
\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} col_1&\cdots&col_n \\ \vdots&\vdots&\vdots \end{matrix}\right]
\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).

\[A = \left[\begin{matrix} A_1&A_2\\ A_3&A_4 \end{matrix}\right] \\
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^{-1}A = I \quad and \quad AA^{-1}=I
\]
  • 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

\[[A \quad I] \quad reduce \quad to \quad [I \quad A^{-1}]
\]

example $A = \left[ \begin{matrix} 2&3 \ 4&7 \end{matrix}\right] $:

\[[A \quad I] = \left[ \begin{matrix} 2&3&1&0 \\ 4&7&0&1 \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.

\[A = LU \quad (which \quad L \rightarrow lower \quad triangular, \quad U \rightarrow upper \quad trangular)
\]
\[(E_{n(n-1)}...E_{31}E_{21})A = U \\
\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:

\[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] \\ =
\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

\[(A^{T})_{ij} = A_{ji}
\]

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:

\[I = \left [ \begin{matrix} 1&& \\ &1& \\ &&1 \end{matrix}\right] \quad
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的更多相关文章

  1. Linear Equations

    4.1 Linear Equations with One Independent Variable

  2. Linear Equations in Linear Algebra

    Linear System Vector Equations The Matrix Equation Solution Sets of Linear Systems Linear Indenpende ...

  3. 线性代数导论 | Linear Algebra 课程

    搞统计的线性代数和概率论必须精通,最好要能锻炼出直觉,再学机器学习才会事半功倍. 线性代数只推荐Prof. Gilbert Strang的MIT课程,有视频,有教材,有习题,有考试,一套学下来基本就入 ...

  4. Java基础常见英语词汇

    Java基础常见英语词汇(共70个) ['ɔbdʒekt] ['ɔ:rientid]导向的                             ['prəʊɡræmɪŋ]编程 OO: object ...

  5. 看到了必须要Mark啊,最全的编程中英文词汇对照汇总(里面有好几个版本的,每个版本从a到d的顺序排列)

    java:  第一章: JDK(Java Development Kit) java开发工具包 JVM(Java Virtual Machine) java虚拟机 Javac  编译命令 java   ...

  6. (转)Awesome Courses

    Awesome Courses  Introduction There is a lot of hidden treasure lying within university pages scatte ...

  7. 专业英语词汇(Java)

    abstract (关键字)             抽象 ['.bstr.kt] access                            vt.访问,存取 ['.kses]‘(n.入口, ...

  8. Lua的各种资源1

    Libraries And Bindings     LuaDirectory > LuaAddons > LibrariesAndBindings This is a list of l ...

  9. JAVA常用单词

    柠檬学院Java 基础常见英语词汇(共 70 个)OO: object-oriented ,面向对象 OOP: object-oriented programming,面向对象编程JDK:Java d ...

  10. java常用英语单词

    abstract (关键字) 抽象 ['.bstr.kt] access vt.访问,存取 ['.kses]'(n.入口,使用权) algorithm n.算法 ['.lg.riem] annotat ...

随机推荐

  1. java+mysql学生信息管理系统

    实现:mysql+eclipse(idea设置之后也可运行)+jdk8 功能: 管理员:管理登+管理员注册 学生:添加学生信息+删除学生信息+修改学生信息+查询学生信息+学生列表展示 界面展示: 详情 ...

  2. Django重点

    Django 简述python三大主流web框架 """ django 大而全,类似于航空母舰 但是有时候过于笨重 flask 小而精,类似于游骑兵(单行代码就可以起一个 ...

  3. 【Azure 微服务】新创建的Service Fabric集群,如何从本地机器上连接到Service Fabric Explorer(Service Fabric状态/错误查看工具)呢?

    问题描述 当在Azure中成功创建一个Service Fabric Cluster 服务后,我们能够在它的Overview页面中发现 Service Fabric Explorer的终结点,但是打开后 ...

  4. 【Azure API 管理】API Management 访问限制策略[quota-by-key] 中参数 [renewal-period] 的实验和理解

    quota-by-key 策略允许根据密钥强制实施可续订或有生存期的调用量和/或带宽配额. 密钥的值可以是任意字符串,通常使用策略表达式来提供密钥. 可以添加可选增量条件,指定应在配额范围内的请求. ...

  5. 【Azure 微服务】Service Fabric 部署时遇见了VMExtensionProvisioningError错误: Multiple VM extensions failed to be provisioned on the VM

    问题描述 Deployment  Azure Service Fabric 时,遇见了VMExtensionProvisioningError, 全文如下: Deployment Name: 385A ...

  6. 轻量级NuGet—BaGet

    1. 介绍 BaGet是一个轻量级的包管理服务.有些时候公司或者个人不希望某一些包进行公开,那么就需要使用私有的包管理服务程序,该服务是用.netcore进行编写的(感谢开发者为社区做出的共享) Gi ...

  7. Java 多线程------测试 Thread中的常用方法 + 线程的优先级:

    1 package com.bytezero.threadexer; 2 3 import javax.sound.midi.Soundbank; 4 5 /** 6 * 测试 Thread中的常用方 ...

  8. Codeforces Round 799 (Div. 4)G. 2^Sort

    暴力枚举每一个端点然后去check 显然是复杂度为\(O(n^2)\)是来不及的. 我们考虑大区间满足小区间一定满足,用两个指针维护一下当前满足不等式的区间,然后长度达到就计算答案. 思路很简单,主要 ...

  9. CPNtools协议建模安全分析(一)

    本文根据最近整理的CPNtools论文和CPNtools官网上的说明,以及参照了乌克兰敖德萨 ---国家电信研究院运输和通信部关于   电信系统协议仿真关于CPNtools的学生讲义.基于此和和自己的 ...

  10. Linux socket 摘要(一)

    PS:要转载请注明出处,本人版权所有. PS: 这个只是基于<我自己>的理解, 如果和你的原则及想法相冲突,请谅解,勿喷. 前置说明   本文作为本人csdn blog的主站的备份.(Bl ...