Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

preface

Hello! Friend!!!

Thank you very much for reading haihong’s article, if there are any mistakes in the article, please point out ~

 

Self-introduction ଘ(੭, ᵕ)੭

Nickname: Haihong

Tag: programmer monkey | C++ contestant | student

Introduction: because of C language to get acquainted with programming, then transferred to the computer major, had the honor to get some national awards, provincial awards… Has been confirmed. Currently learning C++/Linux/Python

Learning experience: solid foundation + more notes + more code + more thinking + learn English well!

 

Machine learning little White stage

The article is only used as my own study notes for the establishment of knowledge system and review

Know what is, know why!

If the view mathematical formula is incomplete or display error

Vector groups of linear algebra and their linear combinations

4.1 Vector groups and their linear combinations

Definition 1

1. N-dimensional vectors

Definition: n ordered numbers A1, A2,…. ,ana_1,a_2,…. ,a_na1,a2,…. ,an, where the n number becomes the n components of the vector, and the ith number aia_{I}ai is called the ith component

2. The real vector

Definition: All components of a vector are real numbers

3. The complex vector

Definition: At least one component of a vector is complex

4. N-dimensional column vector A


a = [ a 1 a 2 . . . a n ] a =\begin{bmatrix} a_1\\ a_2\\ .\\ .\\ .\\ a_n \end{bmatrix}

5. N-dimensional row vector B


b = ( b 1 . b 2 . . . . . b n ) b = (b_1,b_2,… ,b_n)

In general, column vectors are represented by boldface lowercase letters α, β\alpha, \betaα, β, etc., and row vectors are represented by αT, βT\alpha^{T}, \beta^{T}αT, βT, etc., which are generally regarded as column vectors without special instructions

6. Three-dimensional vector space

Definition: a collection of all three – dimensional vectors


R 3 = { r = ( x . y . z ) T x . y . z R } \mathbb{R}^3 = \{r = (x, y, z)^T | x, y, z \in \mathbb{R} \}

It’s called a three-dimensional vector space

In the discussion of vector operations, vectors are regarded as directed line segments

In the discussion of vector set, the vector r is regarded as a point P with r as the diameter, and the trajectory of point P is regarded as the graph of vector set

Radial: Generally refers to position vector. A directed line segment starting at the origin of coordinates and ending at the position of a moving particle at a certain time

Such as point set Π = {P (x, y, z) ∣ ax + by + cz = d \ Pi = \ {P (x, y, z) | Π ax + by + cz = d = {P (x, y, z) ∣ ax + by + cz = d is a plane (a, b, c, insufficiency of 0)

Let’s say that a is equal to b is equal to c is equal to 1 and d is equal to 0 so x plus y plus z is equal to 0 and I’ll distort it a little bit z is equal to minus x minus y so it’s easy to see that this is a plane

So the vector set {r = (x, y, z) T ∣ ax + by + cz = d} \ {r = (x, y, z) ^ T | ax + by + cz = d \} {r = (x, y, z) T ∣ ax + by + cz = d}

Also called a plane in the vector space R3\mathbb{R}^3, and has π \Pi π as its graph

7. N-dimensional vector space

All of the n-dimensional vectors


R n = { x = ( x 1 . x 2 . . . . . . x n ) T x 1 . x 2 . . . . . x n R } \mathbb{R}^n = \{ x = (x_1, x_2,…. , x_n)^T | x_1,x_2,… ,x_n \in \mathbb{R} \}

{x=(x1,x2… , xn) T ∣ a1x1 + a2x2 +… +anxn=b\{ x = (x_1,x_2,… ,x_n)^T | a_1x_1 + a_2x_2 +…. + a_nx_n = b{x=(x1,x2,… , xn) T ∣ a1x1 + a2x2 +… +anxn=b is called the n-1-dimensional hyperplane in the n-dimensional vector space Rn \mathbb{R}^n The n-1-dimensional hyperplane in Rn

8. Vector group

Definition: a set of column vectors (or row vectors) of the same dimension

The entire column vector of an M by n matrix is a set of n m-dimensional column vectors

The column vector group and row vector group of matrix are vector groups containing only finite vectors. Conversely, a set of finite vectors can always form a matrix

For example, A vector group consisting of m n-dimensional column vectors A: A1, A2… ,am(ai, I ∈[1,m] represents an n-dimensional column vector)A:a_1,a_2… ,a_m(a_i, I \in [1,m] represents an n-dimensional column vector)A:a1,a2… , am (ai, I ∈ [m] 1, said A n d column) can make A n * m matrix A = (a1, a2,… ,am)A = (a_1,a_2,… ,a_m)A=(a1,a2,… ,am)

Vector B composed of m n-dimensional row vectors :β1T,β2T… , beta mTB: \ beta_1 ^ T, \ beta_2 ^ T,… , \ beta_m ^ TB: beta 1 t, beta 2 t… ,βmT forms an M * N matrix


B = ( Beta. 1 T Beta. 2 T . . . Beta. m T ) B = \begin{pmatrix} \beta_1^T\\ \beta_2^T \\ .\\ .\\ .\\ \beta_m^T \\ \end{pmatrix}

β I \beta_iβ I is the column vector

In short, an ordered set of vectors containing a finite number of vectors can correspond to a matrix one to one

Definition 2

(1) Given vector group A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… Am, for any set of real numbers k1,k2… ,kmk_1,k_2,… ,k_mk1,k2,… ,km, expression k1a1+ k2A2 +… +kmamk_1a_1 + k_2a_2 + … + k_m a_mk1a1+k2a2+… +kmam is called A linear combination of vector group A, k1,k2…. ,kmk_1,k_2 …. , k_mk1,k2…. Km is called the coefficient of this linear combination

(2) Given vector group A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… ,am and vector b, if there exists a set of numbers λ1,λ2… , lambda m \ lambda_1 \ lambda_2,… , \ lambda_m lambda 1, lambda. 2,… ,λm, such that b=λ 1A1 +λ2a2+…. + lambda_1a_1 + lambda_2a_2 +…. + \ lambda_ma_mb lambda = lambda 1 a1 + 2 a2 +… + lambda mam

(3) Then vector B is A linear representation of vector group A, that is, equations x1A1 + x2A2 +… +xmam=bx_1a_1 + x_2a_2 + … + x_ma_m = bx1a1+x2a2+… + xmam = b has a solution

Theorem 1

Vector BBB can be determined by vector A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… The necessary and sufficient condition for the linear representation of am is that the matrix A=(a1,a2… ,am)A=(a_1,a_2,… ,a_m)A=(a1,a2,… The rank of am is equal to the matrix B=(A1, A2… am,b)B = (a_1,a_2,… a_m,b)B=(a1,a2,… The rank of am, b)

It’s just a system of equations x1A1 +x2a2+… +xmam=bx_1a_1 + x_2a_2 + … + x_ma_m = bx1a1+x2a2+… +xmam=b has A solution because the linear equations Ax=bAx=bAx=b have A solution, if and only if R(A)=R(A,b)R(A)=R(A,b)R(A)=R(A,b) (Theorem 5 in the previous chapter)

Definition 3

Let’s say two vector sets A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… , am a and B: b1, b2,… ,blB:b_1,b_2,…. ,b_lB:b1,b2,…. B can be linearly represented by group A if every vector in group B can be linearly represented by group A.

Vector groups A and B are said to be equivalent if they are represented linearly with each other

Let the vector group A=(a1,a2… ,am)A = (a_1,a_2,… ,a_m)A=(a1,a2,… ,am), vector group B=(b1,b2… ,bl)B=(b_1,b_2,… ,b_l)B=(b1,b2,… ,bl)

If BBB can be linearly represented by AAA, then for each vector bj(j=1,2… , l) b_j (j = 1, 2,… , l) bj (j = 1, 2,… ,l)

There are several k1j, k2j,… ,kmjk_{1j},k_{2j},… ,k_{mj}k1j,k2j,… , KMJ, make


b j = k 1 j a 1 + k 2 j a 2 + . . . + k m j a m = ( a 1 . a 2 . . . . . a m ) ( k 1 j k 2 j . . . k m j ) b_j = k_{1j}a_1 + k_{2j}a_2 + … + k_{mj}a_m = (a_1,a_2,… ,a_m)\begin{pmatrix} k_{1j}\\ k_{2j}\\ .\\ .\\ .\\ k_{mj} \end{pmatrix}

To get


( b 1 . b 2 . . . . . . b l ) = ( a 1 . a 2 . . . . . a m ) ( k 11 k 12 . . . k 1 l k 21 k 22 . . . k 2 l . . . . . . . . . k m 1 k m 2 . . . k m l ) (b_1,b_2,…. ,b_l) = (a_1,a_2,… ,a_m)\begin{pmatrix} k_{11} & k_{12} & … & k_{1l}\\ k_{21} & k_{22} & … & k_{2l}\\ . & . & & .\\ . & . & & .\\ . & . & & .\\ k_{m1} & k_{m2} & … & k_{ml}\\ \end{pmatrix}

Then B=AKB =AKB =AK, where the matrix Km∗ L =(KIj)K_{m * L} =(K_{ij})Km∗ L =(kij) is called the coefficient matrix of this linear representation

The above vector groups A and B are combined with column vector groups. Now we discuss row vector groups to form A and B

set


A = ( a 1 T a 2 T . . . a m T ) B = ( b 1 T b 2 T . . . b l T ) A=\begin{pmatrix} a_1^T\\ a_2^T\\ .\\ .\\ .\\ a_m^T \end{pmatrix} \quad B =\begin{pmatrix} b_1^T\\ b_2^T\\ .\\ .\\ .\\ b_l^T \end{pmatrix}

Because any vector in B can be linearly represented by AAA

So there are


b j T = k j 1 a 1 T + k j 2 a 2 T + . . . + k j m a m T = ( k j 1 . k j 2 . . . . . k j m ) ( a 1 T a 2 T . . . a m T ) ( j [ 1 . l ] ) b_j^T = k_{j1}a_1^T + k_{j2}a_2^T + … + k_{jm}a_m^T =(k_{j1},k_{j2},… ,k_{jm})\begin{pmatrix} a_1^T\\ a_2^T\\ .\\ .\\ .\\ a_m^T \end{pmatrix} (j \in [1,l])

And then get


( b 1 T b 2 T . . . b l T ) = ( k 11 k 12 . . . k 1 m k 21 k 22 . . . k 2 m . . . . . . . . . k l 1 k l 2 . . . k l m ) ( a 1 T a 2 T . . . a m T ) \begin{pmatrix} b_1^T\\ b_2^T\\ .\\ .\\ .\\ b_l^T \end{pmatrix} =\begin{pmatrix} k_{11} & k_{12} & … & k_{1m}\\ k_{21} & k_{22} & … & k_{2m}\\ . & . & & .\\ . & . & & .\\ . & . & & .\\ k_{l1} & k_{l2} & … & k_{lm}\\ \end{pmatrix} \begin{pmatrix} a_1^T\\ a_2^T\\ .\\ .\\ .\\ a_m^T \end{pmatrix}

B is equal to KAB is equal to K, AB is equal to KA

According to the above, if Cm∗n=Am∗lBl∗nC_{m * n} = A_{m * L} B_{L * n}Cm∗n=Am∗lBl∗n, the column vector group of matrix C can be linearly represented by the column vector group of matrix A, and B is the coefficient matrix of this representation

CCC is BBB, AAA is AAA, so BBB is K (B=AK), K (B=AK), K (B=AK).


( c 1 . c 2 . . . . . c n ) = ( a 1 . a 2 . . . . . a l ) ( b 11 b 12 . . . . b 1 n b 21 b 22 . . . . b 2 n . . . . . . . . . b l 1 b l 2 . . . . b l n ) (c_1,c_2,… ,c_n) = (a_1,a_2,… ,a_l)\begin{pmatrix} b_{11} & b_{12} & …. & b_{1n} \\ b_{21} & b_{22} & …. & b_{2n} \\ . & . & & .\\ . & . & & .\\ . & . & & .\\ b_{l1} & b_{l2} & …. & b_{ln} \\ \end{pmatrix}

Meanwhile, if the row vector set of C can all be linearly represented by the row vector set of B, then A is the coefficient matrix of this representation

Using B=KAB =KAB =KA corresponding to C=ABC=ABC=AB you get A which is the matrix of coefficients

Theorem 2

Vector group B: b1, b2,… ,blB:b_1,b_2,… ,b_lB:b1,b2,… Bl can be determined by vector group A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… The necessary and sufficient condition for the linear representation of am is that the matrix A=(a1,a2… ,am)A= (a_1,a_2,… ,a_m)A=(a1,a2,… The rank of am is equal to the matrix (A,B)=(A1… ,am,b1,… ,bl)(A,B) = (a_1,… ,a_m,b_1,… ,b_l)(A,B)=(a1,… ,am,b1,… ,bl) rank, i.e. R(A)=R(A,B)R(A) =R(A,B)R(A) =R(A,B)

instructions

Because BBB can be linearly represented by AAA

So there is a matrix of coefficients KKK, such that B is equal to AKB is equal to AKB is equal to AK

So you could say

There is at least one solution to AX=BAX =BAX =B

And because

System of linear equations Ax = bAx = bAx = b has A sufficient and necessary conditions of solutions is R (A) = R (A, b) R (A) = R (A, b) R (A) = R (A, b)

So R(A)=R(A,B)R(A) =R(A,B)

inference

Vector group A: a1, a2,… ,amA:a_1,a_2,… ,a_mA:a1,a2,… , AM and vector group B: B1, B2… ,blB:b_1,b_2,… ,b_lB:b1,b2,… , the sufficient and necessary conditions of bl equivalent is R = R (A) (B) = R (A, B) R = R (A) (B) = R (A, B) R = R (A) (B) = R (A, B)

Where, A and B are the matrices of vector groups A and B

Proof:

Because BBB can be linearly represented by AAA, then theorem 2 tells us that


R ( A ) = R ( A . B ) R(A) = R(A, B)

And by the same token, AAA can be linearly represented by BBB, so it’s also going to be


R ( B ) = R ( B . A ) R(B) = R(B, A)

And because


R ( A . B ) = R ( B . A ) R(A, B) = R(B, A)

get


R ( A ) = R ( B ) = R ( A . B ) = R ( B . A ) R(A) = R(B) = R(A, B) = R(B, A)

Proof done!

For example,

Case 1

A1 = [1122], a2 = [1212], a3 = (1-140], b = [1031] a_1 = \ begin {bmatrix} \ \ 1 \ \ 2 \ \ 2 \ end {bmatrix}, a_2 = \ begin {bmatrix} 1 2 1 \ \ \ \ \ \ 2 \end{bmatrix},a_3=\begin{bmatrix} 1\\ -1\\ 4\\ 0 \end{bmatrix},b=\begin{bmatrix} 1\\ 0\\ 3\\ 1 A1 = {bmatrix} \ end ⎣ ⎢ ⎢ ⎢ ⎡ 1122 ⎦ ⎥ ⎥ ⎥ ⎤, a2 = ⎣ ⎢ ⎢ ⎢ ⎡ 1212 ⎦ ⎥ ⎥ ⎥ ⎤, a3 = ⎣ ⎢ ⎢ ⎢ ⎡ 1-140 ⎦ ⎥ ⎥ ⎥ ⎤, b = ⎣ ⎢ ⎢ ⎢ ⎡ 1031 ⎦ ⎥ ⎥ ⎥ ⎤

It is proved that the vector BBB can be linearly represented by the vector groups A1, A2, A3a_1, A_2, a_3A1,a2,a3

Proof:

Set A = (a1, a2, a3), B = (A, B) = (a_1, a_2, a_3), B = (A, B) A = (a1, a2, a3), B = (A, B)

According to theorem 1, vector B can be linearly represented by vector groups A1, A2, A3a_1, A_2, a_3A1, A2, and A3

the


R ( A ) = R ( A . b ) = R ( B ) R(A)=R(A,b)=R(B)

So here we just need to simplify BBB to get the rank (R(B)R(B)R(B) R(A)R(A)R(A) R(A))


( 1 0 3 2 0 1 2 1 0 0 0 0 0 0 0 0 ) \begin{pmatrix} 1 & 0 & 3 & 2\\ 0 & 1 & -2 & -1\\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \end{pmatrix}

available


{ x 1 + 3 x 3 = 2 x 2 2 x 3 = 1 \begin{cases} x_1 + 3x_3 = 2\\ x_2 – 2x_3 =-1 \end{cases}

Transposition,


{ x 1 = 3 x 3 + 2 x 2 = 2 x 3 1 \begin{cases} x_1 = -3x_3 + 2\\ x_2 = 2x_3 -1 \end{cases}

So x3 is equal to cx_3 is equal to cx3 is equal to c


{ x 1 = 3 c + 2 x 2 = 2 c 1 x 3 = c \begin{cases} x_1 = -3c + 2\\ x_2 = 2c -1\\ x_3 = c \end{cases}

launch


x = c ( 3 2 1 ) + ( 2 1 0 ) = ( 3 c + 2 2 c 1 c ) x = c\begin{pmatrix} -3\\ 2\\ 1 \end{pmatrix} + \begin{pmatrix} 2\\ -1\\ 0 \end{pmatrix} = \begin{pmatrix} -3c + 2\\ 2c – 1\\ c \end{pmatrix}

$x = \begin{pmatrix}

x_1\ x_2\ x_3 \end{pmatrix}$

so

B = (a1, a2, a3) x = (- 3 c + 2) a1 + a2 (2 c – 1) + ca3b = (a_1, a_2, a_3) x = (- 3 c + 2) a_1 + a_2 + – 1 (2 c) Ca_3b = (a1, a2, a3) x = (- 3 c + 2) a1 + a2 + ca3 (2 c – 1), including c can take any value

Case 2

Set a1 = [1-11-1), a2 = [3113], b1 = [2011], b2 = [1102], b3 = a_1 = \ [3-120] begin {bmatrix} \ \ 1 \ \ 1 \ \ 1 \end{bmatrix},a_2=\begin{bmatrix} 3\\ 1\\ 1\\ 3 \end{bmatrix},b_1=\begin{bmatrix} 2\\ 0\\ 1\\ 1 \end{bmatrix},b_2=\begin{bmatrix} 1\\ 1\\ 0\\ 2 \end{bmatrix}, b_3=\begin{bmatrix} 3\\ -1\\ 2\\ 0 A1 = {bmatrix} \ end ⎣ ⎢ ⎢ ⎢ ⎡ 1-11-1 ⎦ ⎥ ⎥ ⎥ ⎤, a2 = ⎣ ⎢ ⎢ ⎢ ⎡ 3113 ⎦ ⎥ ⎥ ⎥ ⎤, b1 = ⎣ ⎢ ⎢ ⎢ ⎡ 2011 ⎦ ⎥ ⎥ ⎥ ⎤, b2 = ⎣ ⎢ ⎢ ⎢ ⎡ 1102 ⎦ ⎥ ⎥ ⎥ ⎤, b3 = ⎣ ⎢ ⎢ ⎢ ⎡ 3-120 ⎦ ⎥ ⎥ ⎥ ⎤

Prove that vector groups A1, A2A_1, A_2A1, A2 are equivalent to vector groups B1, B2, B3B_1, B_2, B_3B1, B2,b3

Proof:

Set A = (a1, a2), B = (b1, b2, b3) A = (a_1, a_2), B = (b_1 b_2, b_3) A = (a1, a2), B = (b1, b2, b3)

The corollary of theorem 2 shows that AAA is equivalent to BBB

instructions


R ( A ) = R ( B ) = R ( A . B ) R(A)=R(B)=R(A,B)

So let’s simplify (A,B)(A,B)(A,B)

get


R ( A ) = R ( A . B ) = 2 R(A)=R(A,B)=2

And it’s obvious that BBB has a second order subexpression that is not equal to 0

instructions


R ( B ) p 2 R(B) \geq 2

And because


R ( B ) Or less R ( A . B ) = 2 R(B) \leq R(A,B)=2

So there are


2 Or less R ( B ) Or less 2 2 \leq R(B) \leq 2

launch


R ( B ) = 2 R(B)=2

To sum up


R ( A ) = R ( B ) = R ( A . B ) R(A)=R(B)=R(A,B)

So AAA is the same thing as BBB

Theorem 3

Let vector group B=b1,b2… ,blB = b_1, b_2,… , b_lB=b1,b2,… Bl can be determined by vector group A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… ,am is linear, then R(b1,b2… , bl) or less R (a1, a2,… ,an)R(b_1,b_2,… ,b_l) \leq R(a_1,a_2,… ,a_n)R(b1,b2,… , bl) or less R (a1, a2,… ,an)

Proof:

Make A = (a1, a2,… ,am)A=(a_1,a_2,… ,a_m)A=(a1,a2,… , am), B = (b1, b2,… ,bl)B=(b_1,b_2,… ,b_l)B=(b1,b2,… ,bl)

Because BBB can be linearly represented by AAA

Then there is


R ( A ) = R ( A . B ) ( By the theorem 2 come ) R(A) = R(A, B)(theorem 2)

Because R(B)<=R(A,B)R(B) <=R(A,B)R(B) <=R(A,B)

so


R ( B ) < = R ( A ) R(B) <= R(A)

summary

By the above law, inference can be obtained

Vector group B: b1, b2,… ,blB:b_1,b_2,… ,b_lB:b1,b2,… Bl can be determined by vector group A: A1, A2… ,amA:a_1,a_2,… ,a_mA:a1,a2,… The matrix KKK is linear to indicate Leftrightarrow so that the equation AK=BAK=BAK=B has a solution

conclusion

The essay is just a study note, recording a process from 0 to 1

Hope to help you, if there is a mistake welcome small partners to correct ~

I am haihong ଘ(੭, ᵕ)੭

If you think it’s ok, please give it a thumbs up

Thanks for your support ❤️