Summary of Linear Algebra

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

USTH Learning Support – Math & Physics Department

Xin chào các bạn,

Tết đã đến rồi và sau tết chúng ta sẽ có 1 bài thi quan trọng đó là bài thi cuối kì. Do vậy, để giúp
mọi người tranh thủ dịp tết này ôn luyện bộ môn Linear Algebra, chúng mình đã tổng hợp các lý
thuyết cần thiết của môn vào trong tài liệu này. Trong tài liệu chỉ có công thức và những ví dụ,
nên chúng mình cũng chuẩn bị những bài tập tổng hợp theo đề để mọi người có thể làm luyện
tập. Các bạn truy cập vào đây để lấy bài tập nha (có kèm sẵn lời giải cho các bạn luôn �).

Chúc các bạn ăn tết vui vẻ.

OUTLINE:

I. System of linear equations - Matrices


II. Matrices operations
III. Determinant
IV. Vector spaces
V. Inner product spaces
VI. Linear transformations
VII. Eigen values, eigenvectors - Diagonalization
USTH Learning Support – Math & Physics Department

LINEAR ALGEBRA

I. SYSTEM OF LINEAR EQUATION


1. Introduction to Systems of linear equation
- Linear equation:

- Solution set of a system of linear equation:

- 2 types of matrix:
USTH Learning Support – Math & Physics Department

- Elementary row operations (Phép biến đổi hàng sơ cấp):

- Different methods to solve a system of linear equations:


We can either apply appropriate elementary row operations directly on the system
of linear equations
Or
Transform the system of linear equations to matrix form then apply appropriate
elementary row operations on that matrix
For example: Solving by applying row operations directly to the system vs.
transform the system to matrix form and then apply row operations on it:
USTH Learning Support – Math & Physics Department

2. Gaussian Elimination and Gauss-Jordan Elimination


- Matrix form: Row-echelon + Reduced Row-echelon:
● Row-echelon form:

Example:

● Reduced row-echelon form: This form consists of all factors of row-


echelon form and it also has a bonus factor

Example:
USTH Learning Support – Math & Physics Department

- Gauss elimination method: using elementary row operations to reduce a matrix


to row-echelon form
- Gauss-Jordan elimination method: using elementary row operations to reduce a
matrix to reduced row-echelon form

II. MATRICES OPERATION


1. Operations with Matrices
- Diagonal matrix:

- Trace:

- Addition:

- Scalar multiplication:
USTH Learning Support – Math & Physics Department

- Subtraction:

- Matrix multiplication:

+ The number of columns in A must equals the number of rows in B (số hàng của A
bằng với số cột của B)
+ Simply saying, entry (i,j) of matrix AB equals “row i of A multiply with column j
of B” (lấy hàng của A nhân với cột của B)
+ To multiply a row in A with a column in B, multiply the 1st entry of the row in A
with the 1st entry of the column in B, 2nd of row with 2nd of entry of column, … nth
entry of row with nth entry of column. Finally, take the sum of all of them.
For example:

→ 1st row of matrix A is [-1 3], 1st column of matrix B: [-3 -4]
→ Entry (1,1) of matrix AB = (-1).(-3) + 3.(-4) = -9
Calculate similarly with the other entries of AB.
Note: A + B = B + A but AB ≠ BA
USTH Learning Support – Math & Physics Department

2. Properties of matrices operation


- Zero matrix:

- Identity matrix of order n (Ma trận đơn vị):

- Properties of matrix multiplication:

- Transpose of a matrix (Ma trận chuyển vị):

Hiểu đơn giản là đảo hàng thành cột hoặc đảo cột thành hàng.
- Properties of transposes:
USTH Learning Support – Math & Physics Department

- Symmetric matrix (Ma trận đối xứng):

Note: Both 𝐴𝐴𝐴𝐴𝑇𝑇 and 𝐴𝐴𝑇𝑇 𝐴𝐴 are symmetric matrix.

3. Inverse of a Matrix
- Definition of inverse matrix (ma trận nghịch đảo):

- How to find the inverse of a matrix:

Example:

- Check for invertible:


USTH Learning Support – Math & Physics Department

If A can be row reduced to I (or det(A) ≠ 0), then A is invertible (nonsingular).

If A can’t be row reduced to I (or det(A) = 0), then A is noninvertible (singular).

- Properties of inverse matrices:

III. DETERMINANTS
1. Determinant of a matrix
- Only square matrices have determinants
- Determinant of a 1x1 matrix:
A = [a] → det(A) = a
- Determinant of a 2x2 matrix:
USTH Learning Support – Math & Physics Department

2. Computing determinant of a matrix


- Minor and cofactor:

Example:

- Determinant of any square matrix of size > 2 (Tradition - Laplace Expansion):


USTH Learning Support – Math & Physics Department

- Some special cases:


● Triangular Matrix (Upper/lower triangular + Diagonal matrix):
determinant = product of all entries along diagonal
● 3x3 matrix:

● Cases when determinant = 0:

- Elementary row operations, elementary column operations and determinants:


USTH Learning Support – Math & Physics Department

- Combined method (applying traditional + elementary row/column operations)


● Choose 1 row/column (Chọn 1 hàng/cột)
● Keep 1 entry, eliminate all others on that same row/column, by applying
elementary row/column operations (Giữ lấy 1 giá trị, đưa các giá trị khác
cùng hàng/cột với giá trị đó về 0 bằng các phép biến đổi hàng/cột)
● Evaluate determinant using traditional + elementary operations (Tính ma
trận theo phương pháp truyền thống – khai triển Laplace và các phép biến
đổi sơ cấp)

3. Properties of determinants
- det(AB) = det(A)det(B)
- det(cA) = cn det(A) (n is the order of the matrix)
- det(A-1) = 1/det(A) (if A is invertible)
- det(AT) = det(A)
- det(In) = 1 (In is identity matrix)
- If a matrix A has det(A) ≠ 0
+ A is invertible
+ Ax = b has a unique solution for every matrix b
+ Ax = 0 has only trivial solution

4. Application of determinants
a. Finding inverse matrix:
- Step 1: Find matrix of cofactors:

- Step 2: Find adjoint matrix:

- Step 3: Find det(A)


- Step 4: Find A-1
USTH Learning Support – Math & Physics Department

b. Solve a system of linear equations using Cramer’s rule:


Assume that we want to find only xj from the system of linear equations:

Matrix form:

- Step 1: Consider A as a 1xn matrix of sub-column-matrix:

- Step 2: Replace A(j) by b to provide a matrix Aj:

- Step 3: Calculate det(Aj)


- Step 4: Calculate det(A)
- Step 5: Calculate xj = det(Aj)/ det(A)

IV. VECTOR SPACE


1. Vector:
- Definition:

- Operations:
● Equal

● Addition

● Scalar multiplication
USTH Learning Support – Math & Physics Department

- Linear combination:
Given a set of vectors (v1,v2,…,vn)

2. Vector spaces (V,+,●)


a. Definition
- Vector space is a set of vectors where vector addition (+) and scalar multiplication
(●) are defined and satisfies 10 axioms:

Thường thì trong đề thi sẽ không có những câu cần dùng đến cả 10 tiên đề này, tuy
nhiên các bạn phải học để hiểu hết cả 10 tiên đề này áp dụng như nào.
b. Subspace
- Definition:
USTH Learning Support – Math & Physics Department

- Properties:

Tips:
• Với những dạng bài xác định subspace, có thể thử trước bằng cách nếu tập đó
không có vector 0 thì sẽ không phải là subspace. (Theo tính chất của vector
space).
• Khi cần chứng minh 1 tập là vector space, ta có thể chỉ cần chứng minh tập đó
là subspace của những tập sau ℝ𝑛𝑛 , ℙ𝑛𝑛 , Mat 𝑚𝑚×𝑛𝑛 .
c. Spanning set
- Definition:
Given a vector space (V,+,●)
Given S = {v1,v2,…,vn}
S is a spanning set of V if: ∃v ∈ V, ∃c1,c2,…cn ∈ R s.t.: v = c1 v1 + c2 v2 + … + cn vn
(every vector v ∈ V is a linear combination of vectors in S)
- Properties:

d. Linear Independent (L.I.) and Linear dependent (L.D.)


- Definition:
Given a vector space V
Given S = {v1,v2,…,vn}
S is L.I. if c1 v1 + c2 v2 + … + cn vn = 0 ⬄ c1 = c2 =… = cn = 0
S is L.D.  S is not L.I.
- Properties:
USTH Learning Support – Math & Physics Department

● Subset relations with L.I. and L.D.:

- Method to prove L.I. or L.D.:


Given a vector space V, S = {v1,v2,…,vn}
Consider the equation: c1 v1 + c2 v2 + … + cn vn = 0  We get a system of linear
equations where c1, c2, … cn are variables to be computed.
Let A be the coefficient matrix
Case 1: A is a square matrix (Fast case)
Compute the determinant of A
If det(A) ≠ 0 → S is L.I.
If det(A) = 0 → S is L.D.
Case 2: A is not a square matrix (General case)
We cannot calculate det(A) in this case (Recall: determinant can only be computed
for square matrices)
+ Solve the system of linear equations (by traditional method or applying
Gauss/Gauss-Jordan elimination)
+ Get solution set (c1, c2, c3, …, cn)
+ Conclude S is L.I. or L.D.
e. Basis and dimension
- Basis:
Given a vector space V
Given S = {v1,v2,…,vn} ∈ V
If S spans V and S is L.I. → S is a basis of V
- Dimension: dimension of V = number of vectors in basis of V
USTH Learning Support – Math & Physics Department

- Notation: dim(V) = #(S)


- Properties of basis:

- Method to prove S is a basis of V:


● If the dimension of V is unknown:
Prove V = span(S) and S is L.I.
● If the dimension of V is known:
Prove V = span(S) or S is L.I. (S is L.I. is easier to check)
f. 4 fundamental subspaces
Definition:
Given a matrix A
- Row space – RS(A): spanned by row vectors of A = span{A(1),A(2),…,A(n)} with
A(1),A(2),…,A(n) are rows
- Column space – CS(A) or range(A): spanned by column vectors of A =
span{A(1),A(2),…,A(n)} with A(1),A(2),…,A(n) are columns
- Null space – NS(A) or ker(A): set of all solutions of Ax = 0 → in other words, the
solution space of Ax = 0
- Left null space – NS(AT): null space of AT
Method to find a basis for row-space of a matrix A (NS(A)):
- Step 1: Using row-operations (which do not affect the row space of A) to transform
it into a row-echelon form matrix B
- Step 2: Conclude that non-zero row vectors of B form a basis for RS(A)
Method to find a basis for column-space of a matrix A (CS(A)):
USTH Learning Support – Math & Physics Department

- Step 1: Using row-operations (which do not affect the row space of A) to transform
it into a row-echelon form matrix B
- Step 2: Find column vectors of B that contain the leading 1s
- Step 3: Find the corresponding column vectors of A
- Step 4: Conclude that those column vectors of A form a basis for CS(A)
g. Rank and nullity
- RS(A) and CS(A) always have the same dimension
- The dimension of row/column space of A is called rank:
rank(A) = dim(RS(A)) = dim(CS(A))
- The dimension of null space of A is called nullity:
nullity(A) = dim(NS(A))
- If a matrix A has n column, then: n = rank(A) + nullity(A)
- Note: rank(AT) = rank(A)
h. Coordinates and change of basis
- Coordinate definition:
Given a vector space V
Let B = {v1,v2,…,vn} be a basis of V
Let x = c1 v1 + c2 v2 + … + cn vn
Then c1, c2,… cn are called coordinates of x relative to basis B
Coordinate matrix :

- Transition matrix from a basis B to a basis B’: BC = B’


- Method to find transition matrix:
● Step 1: Find coordinate matrices of all vectors of B’ relative to basis B
● Step 2: Combining those coordinate matrices in order → Conclude that
it’s the transition matrix C
USTH Learning Support – Math & Physics Department

- Another way to find transition matrix:

Here, v1, v2,…,vn and u1,u2,…,un are represented as column vectors

Note: if C is the transition matrix from B to B’ → C-1 is the transition matrix from B’
to B

- Change of basis problem:


Given a basis B
Let x be a vector whose coordinates relative to B was given
Given a new basis B’
Find the coordinates of x relative to B’
Using transition matrix:
● Step 1: Find transition matrix from B → B’
● Step 2: Multiply the coordinate matrix of x with the transition matrix

Not using transition matrix:

● Step 1: Find x
● Step 2: Find coordinates of x relative to B’ (by solving system of linear
equations)

V. INNER PRODUCT
1. Inner Product
We have:
u = (u1, ….. un) ∈ Rn.
v = (v1, ….. vn) ∈ Rn
USTH Learning Support – Math & Physics Department

- The length of a vector v: ∥ v ∥= �𝑣𝑣1 2 + 𝑣𝑣2 2 + . . +𝑣𝑣𝑛𝑛 2


- The distance between two vectors u and v:
𝑑𝑑(𝑢𝑢, 𝑣𝑣) = ∥ 𝑢𝑢 − 𝑣𝑣 ∥ = �(𝑢𝑢1 − 𝑣𝑣1 )2 + (𝑢𝑢2 − 𝑣𝑣2 )2 +. . +(𝑢𝑢𝑛𝑛 − 𝑣𝑣𝑛𝑛 )2
- Dot product in Rn: u.v = u1.v1+…+un.vn
- The angle between u and v is θ ∈ [0, π]: Cos θ = (u.v)/(∥u∥∥v∥)

- Orthogonal vectors: Two vectors u and v in Rn are orthogonal if u.v = 0.

- Inner product:
Rn Inner product
u.v = v.u <u,v> = <v,u>
u.(v+w) = u.v + u.w <u,v+w> = <u,v> + <u,w>
u.(c.v) = c.(u.v) u.<c,v> = c.<u,v>
u.u ≥ 0 <u,u > ≥ 0
u.u = 0 <=> u = 0 <u,u> = 0 <=> u = 0
Cos θ = (u.v)/(∥u∥.∥v∥) Cos θ = <u.v>/(∥u∥.∥v∥)
<u, v>= c1u1v1 + c2u2v2 +…+ cnunvn in which ci >0
We can check for inner product by checking 4 first things (axioms)
All formula in Rn are the same in Inner product.
NOTE: u and v can be in any vector space other than Rn
USTH Learning Support – Math & Physics Department

Example: In M2,2
A = [a11 a22; a21 a22]
B = [b11 b22; b21 b22]
Inner product <A,B> = a11b11 + a12b12 + a21b21 + a22b22
- Orthogonal projections:

Note: u – projvu is orthogonal to v.


2. Orthonormal Bases: Gram-Schmidt Process
- Definition:

Nắm chắc 2 khái niệm trực giao và trực chuẩn. Ngoài ra, khái niệm này có thể hiểu
đơn giản giống việc tìm hình chiếu của 1 vector đối với 1 vector khác (nôm na là kẻ
đường cao �)

Hệ quả:
USTH Learning Support – Math & Physics Department

Ta có thể sử dụng hệ quả này để đi làm dạng bài xác định basis.
- Orthogonal cho inner product space (chiếu nhiều vector)

Từ đây, ta có thể sử dụng Gram-Schmidt để đi tìm tập orthogonal và orthonormal của


inner product
USTH Learning Support – Math & Physics Department

Example:

VI. LINER TRANSFORMATION


1. Definition
USTH Learning Support – Math & Physics Department

V, W − vector spaces
T: V → W, a map from V to W is linear transformation if it satisfies
(1) T (u + v) = T (u) +T (v), ∀u, v ∈V
(2) T(cu) = cT(u), ∀c ∈R
Properties:

Dim(preimage) = number of columns


Dim(image) = number of rows
2. The Kernel and Range of a Linear Transformation

Example:
USTH Learning Support – Math & Physics Department

- Range:

Example:
USTH Learning Support – Math & Physics Department

- One to one

Note: Let T: V -> W be a L.T. T is 1-1 if Ker(T)={0}


- Onto:

Rank(T) = dim(W)
- Isomorphism:
USTH Learning Support – Math & Physics Department

3. Matrices for Linear Transformations

- Composition of T1: Rn→Rm with T2: Rm→Rp:


USTH Learning Support – Math & Physics Department

- Inverse linear transformation:

- Matrix of a LT in general case:


USTH Learning Support – Math & Physics Department

Với transitional matrix, ta có thể áp dụng đi tìm T(v) bên cạnh cách sử dụng standard
matrix

Example (Đọc kĩ 2 ví dụ dưới đây):


USTH Learning Support – Math & Physics Department

4. Transition Matrices and Similarity

Làm theo indirect để ý lại khái niệm transition matrix cho P(đọc lại trong lecture 4).
Example:
USTH Learning Support – Math & Physics Department
USTH Learning Support – Math & Physics Department

- Similar matrix:

VII. EIGENVALUES AND EIGENVECTORS


1.Eigenvalues and Eigenvectors

- Find eigenvalues & eigenvectors:

- Eigenspace:
USTH Learning Support – Math & Physics Department

Example:

- Special case:

- Eigenvalues and eigenvectors of linear transformations:


USTH Learning Support – Math & Physics Department

Hiểu nôm na là các bạn sẽ đi tìm standard matrix A cho T(x) = Ax rồi thay ma trận A
đó vào tìm eigenvalue và eigenvector như bình thường.
2. Diagonalization
- Definition:

- Condition for diagonalization:


USTH Learning Support – Math & Physics Department

Example:

- Step for diagonalizing (đặc biệt chú ý xếp p với 𝜆𝜆 tương ứng):

Example:
USTH Learning Support – Math & Physics Department

- Notes:
USTH Learning Support – Math & Physics Department

- Diagonalize a linear transformation:

Tips: Find basis B is finding eigenspace of standard matrix.


3. Symmetric Matrices and Orthogonal Diagonalization
- Definition:

Hiển nhiên symmetric matrix thì sẽ chéo hóa được mà không cần điều kiện.
- Orthogonal matrix:

Note: Kiểm tra kĩ điều kiện của orthogonal matrix (mỗi vector cột là unit vector và
tích từng cặp vector cột bằng 0)
- Properties:
USTH Learning Support – Math & Physics Department

- Orthogonal Diagonalization:

- Orthogonal diagonalization steps:

Example:
USTH Learning Support – Math & Physics Department

Note: Với trường hợp mà các eigenvalue 𝜆𝜆 khác nhau thì các cặp eigenvector vuông
với nhau(tính chất symmetric matrix) nên khi xác định P chỉ cần đưa các eigenvector
về unit vector. Còn nếu có eigenvalue trùng nhau thì các eigenvector tương ứng sẽ
không vuông với nhau, ta phải dung Gram-Schmidt để đưa về orthonormal.

You might also like