A very quick guide to Linear Algebras-I

    General:

    (1) things we are interested in: matrix and system of linear equations

    (2) key points: operations satisfying linear property: 23-DEC - 图1%20%3Dc_1%20f(x_1)%2Bc_2f(x_2)%2C%20%5Cforall%20x_1%2C%20x_2%20%5Cin%20X%2C%20%5Cforall%20c_1%2C%20c_2%20%5Cin%20%5Cmathbb%7BR%7D#card=math&code=f%3A%20X%20%5Cto%20Y%2C%20f%28c_1x_1%2Bc_2x_2%29%20%3Dc_1%20f%28x_1%29%2Bc_2f%28x_2%29%2C%20%5Cforall%20x_1%2C%20x_2%20%5Cin%20X%2C%20%5Cforall%20c_1%2C%20c_2%20%5Cin%20%5Cmathbb%7BR%7D&id=QLdTS), provided that it makes sense to define 23-DEC - 图2 for 23-DEC - 图3.

    (3) Other operations and properties (but we will not discuss).


    A Real (or Complex if you like) Matrix, is an 23-DEC - 图4 array.

    Example:

    23-DEC - 图5.

    23-DEC - 图6: 23-DEC - 图7, 23-DEC - 图8: 23-DEC - 图9 —— the numbers of Row and Column sometimes are explicitly written out.

    Matrix entries (or elements).

    Definition: (1) As matrices, 23-DEC - 图10 if they have same numbers of rows and columns, and they are equal elementwise.

    23-DEC - 图11. 23-DEC - 图12 as matrices.

    (2) Let 23-DEC - 图13 be two matrices of the same size (say 23-DEC - 图14). Define their sum (difference) in the obvious way: the sum 23-DEC - 图15 also has size 23-DEC - 图16, and its entries are obtained as the sum of the entries of 23-DEC - 图17 and 23-DEC - 图18 correspondingly.

    Example: 23-DEC - 图19.

    The difference is defined similarly.

    Proposition: Two matrices 23-DEC - 图20 iff 23-DEC - 图21 is the zero matrix. (all entries are 0).

    Remark: there are zero matrices in every size. But we usually call them the zero matrix in general. When we must emphasis the size of a zero matrix, we can write 23-DEC - 图22.

    (3) (The first key point). Now suppose 23-DEC - 图23%7Bm%20%5Ctimes%20n%7D%2C%20B%3D%20(b%7Bij%7D)%7Bp%20%5Ctimes%20q%7D#card=math&code=A%3D%28a%7Bij%7D%29%7Bm%20%5Ctimes%20n%7D%2C%20B%3D%20%28b%7Bij%7D%29%7Bp%20%5Ctimes%20q%7D&id=o8AdT), where 23-DEC - 图24 are positive integers. For example, let us take 23-DEC - 图25 as above. Then ![](https://g.yuque.com/gr/latex?a%7B12%7D%3D5%2C%20b%7B21%7D%3D1#card=math&code=a%7B12%7D%3D5%2C%20b_%7B21%7D%3D1&id=KvrKh).

    One can define the product 23-DEC - 图26 only if 23-DEC - 图27. When it is the case, the product 23-DEC - 图28#card=math&code=C%3DAB%20%3D%20%28c_%7Bij%7D%29&id=I6dJ9) has size 23-DEC - 图29, and is determined by the following formula:

    23-DEC - 图30.

    That is, the 23-DEC - 图31#card=math&code=%28i%2C%20j%29&id=usGV1)-entry in the product 23-DEC - 图32, is given by the “product” of the 23-DEC - 图33th row entries of 23-DEC - 图34 and the 23-DEC - 图35th column entries of 23-DEC - 图36.

    Example:

    We can multiply 23-DEC - 图37. But 23-DEC - 图38 is not well-defined. This shows that matrix multiplication is NOT commutative.

    23-DEC - 图39.

    (4) Scalar multiplication of matrices: Let 23-DEC - 图40#card=math&code=A%3D%28a%7Bij%7D%29&id=wurVt) be a matrix, and 23-DEC - 图41 a scalar, the scalar multiplication 23-DEC - 图42 is a matrix whose entries are ![](https://g.yuque.com/gr/latex?(%5Clambda%20a%7Bij%7D)#card=math&code=%28%5Clambda%20a_%7Bij%7D%29&id=fNORy) .

    Example: 23-DEC - 图43,

    23-DEC - 图44M_2%20%3D%20M_1%20%3D%20%5Cbegin%7Bpmatrix%7D%201%20%26%200%20%263%2F2%20%5C%5C%200%20%26%202%20%26%200%20%5Cend%7Bpmatrix%7D#card=math&code=%281%2F2%29M_2%20%3D%20M_1%20%3D%20%5Cbegin%7Bpmatrix%7D%201%20%26%200%20%263%2F2%20%5C%5C%200%20%26%202%20%26%200%20%5Cend%7Bpmatrix%7D&id=bG74b).

    23-DEC - 图45

    Remarks: We have the following rules to compute matrices addition and multiplications:

    (1) 23-DEC - 图46 suppose the equation makes sense.

    (2) If we have an arbitrary real number 23-DEC - 图47, then 23-DEC - 图48%20%3D%20%5Calpha%20M%20%2B%20%5Calpha%20N#card=math&code=%5Calpha%28M%2BN%29%20%3D%20%5Calpha%20M%20%2B%20%5Calpha%20N&id=EcJ25), where 23-DEC - 图49 is defined as 23-DEC - 图50 multiplying all entries of 23-DEC - 图51.

    (3) Suppose 23-DEC - 图52 and 23-DEC - 图53 are matrices such that 23-DEC - 图54 is well-defined (which means the number of columns of 23-DEC - 图55 is equal to the number of rows of 23-DEC - 图56). We have 23-DEC - 图57N%20%3D%20M%20(%5Calpha%20N)%20%3D%20%5Calpha%20(MN)#card=math&code=%28%5Calpha%20M%29N%20%3D%20M%20%28%5Calpha%20N%29%20%3D%20%5Calpha%20%28MN%29&id=powF2) .

    (4) Warning: For two matrices, if 23-DEC - 图58 is well-defined and 23-DEC - 图59 , this does not imply that 23-DEC - 图60 or 23-DEC - 图61. Example: 23-DEC - 图62.


    Now we look at an important application of matrices. We use it to solve systems of linear equations. A system of 23-DEC - 图63 linear equations in 23-DEC - 图64 variables is given as follows:

    23-DEC - 图65

    here the variables are 23-DEC - 图66. “Linear” means that all equations are polynomials in 23-DEC - 图67 of degree 23-DEC - 图68.

    The algorithm is called “the Gaussian elimination”.

    Write down two matrices from the above system:

    the coefficient matrix 23-DEC - 图69 ,

    and

    the augmented matrix 23-DEC - 图70.

    Let us write 23-DEC - 图71 , and 23-DEC - 图72 . Moreover, we let 23-DEC - 图73, then the original system can be written in matrix notations as

    23-DEC - 图74

    The Gaussian elimination algorithm is based on the very imporant

    Elementary Row Transformations

    for matrices. There are 3 kinds of elementary row transformations.

    (i) switching two rows;

    (ii) multiplying a row by a (non-zero) constant;

    (iii) a row multiplying a non-zero constant and then add to another row. (but the first mentioned row is not changed).

    Examples: Let 23-DEC - 图75 (23-DEC - 图76 is called the identity matrix of dimension 23-DEC - 图77.)

    Now let us apply these elementary row transformations to 23-DEC - 图78:

    (i) We switch row 1 and row 3 (denoted 23-DEC - 图79 ): 23-DEC - 图80.

    (ii) We multiply the first row by 4 (denoted 23-DEC - 图81): 23-DEC - 图82.

    (iii) 23-DEC - 图83 will result in 23-DEC - 图84.


    The Gaussian elimination method:

    1. Starting with the augmented matrix 23-DEC - 图85.
    2. Using elementary row transformations, to change 23-DEC - 图86 into an echelon form.
      echelon23-DEC - 图87%20%3D%5Cbegin%7Bpmatrix%7D%201%20%26%200%20%26%200%20%26%20%5Cvdots%20%26%201%5C%5C%200%20%26%201%20%26%20%200%20%26%5Cvdots%20%26%20%200%5C%5C%200%20%26%200%20%26%201%20%26%20%5Cvdots%20%26%200%5Cend%7Bpmatrix%7D#card=math&code=%28A%29%20%3D%5Cbegin%7Bpmatrix%7D%201%20%26%200%20%26%200%20%26%20%5Cvdots%20%26%201%5C%5C%200%20%26%201%20%26%20%200%20%26%5Cvdots%20%26%20%200%5C%5C%200%20%26%200%20%26%201%20%26%20%5Cvdots%20%26%200%5Cend%7Bpmatrix%7D&id=CdUpQ).
    3. Now determine whether there is a solution.
      The criterion is: the number of non-zero rows in the echelon(A) = the number of non-zero rows in echelon(C).
      If this holds, then there are solutions. Otherwise, no solution.
    4. Now read off the solution: 23-DEC - 图88, which means 23-DEC - 图89.

    Echelon form:

    Rule 1: All-zero-rows must put below non-zero rows. (suppose there are all-zero-rows)

    Rule 2: For all 23-DEC - 图90, the first non-zero element in the 23-DEC - 图91-th row must on the right to the first non-zero element in the 23-DEC - 图92#card=math&code=%28k-1%29&id=WippT)-th row.

    A matrix satisfying these two rules is called an echelon form.

    Example: For the matrix 23-DEC - 图93, one of its echelon form is 23-DEC - 图94.

    23-DEC - 图95 23-DEC - 图96 23-DEC - 图97r_2%7D#card=math&code=%5Cxrightarrow%7B%281%2F38%29r_2%7D&id=gptgw) 23-DEC - 图9823-DEC - 图99r_1%7D#card=math&code=%5Cxrightarrow%7B%28-1%2F2%29r_1%7D&id=GUejD) 23-DEC - 图100 23-DEC - 图101r_2%7D#card=math&code=%5Cxrightarrow%7Br_1%20%2B%20%283%2F2%29r_2%7D&id=vq1f3) 23-DEC - 图102.

    Conclusion: Echelon form of a matrix is not necessarily unique.

    An enhancement to the (row) Echelon form, called the “Reduced Row Echelon Form”, RREF , is defined as follows:

    Rule 1 (for RREF): It is already an echelon form.

    Rule 2 (for RREF): To all (non-zero) rows, the first non-zero element must be 23-DEC - 图103.

    We call these “1” pivots.

    Rule 3 (for RREF): In the columns where the pivots “1” in Rule 2 are in, all other entries in these columns must be zero. (The pivoting columns must only have a pivot “1” and other entries 0).

    Proposition: RREF of a matrix is uniquely determined by this matrix. (More precisely, given an arbitrary matrix 23-DEC - 图104, one can write down a matrix in RREF attached to 23-DEC - 图105.)

    Example: Using RREF to solve system of linear equations. The augmented matrix is

    23-DEC - 图106

    its RREF is

    23-DEC - 图107

    The pivots are in the first two columns.

    There are two non-zero rows in the augmented matrix, as well as in the coefficient matrix.

    Conclusion: there must be a solution!

    Q: How to write down the solution(s)?

    A: Using the pivots in the RREF!

    (1) Locate the columns 23-DEC - 图108 where the pivots lie in. We then choose 23-DEC - 图109 as main variables, and

    (2) we use other variables to express the main varibles.

    Then we can write down all solutions!

    Here: 23-DEC - 图110 are main variables, 23-DEC - 图111 are free variables.

    23-DEC - 图112x_3%20-%20(3%2F4)x_4%20%2B%205%2F4#card=math&code=x_1%20%3D%20%283%2F2%29x_3%20-%20%283%2F4%29x_4%20%2B%205%2F4&id=E0Pjk)

    23-DEC - 图113x_3%20%2B%20(7%2F4)x_4%20-%201%2F4#card=math&code=x_2%20%3D%20%283%2F2%29x_3%20%2B%20%287%2F4%29x_4%20-%201%2F4&id=hP9TM)

    So that when 23-DEC - 图114 are determined, so are 23-DEC - 图115.

    23-DEC - 图116

    An example without solution

    23-DEC - 图117

    Explanation: The last row says that 23-DEC - 图118.

    This is an inconsistent equation. Thus the original system has no solution.

    Remark: If the constant column 23-DEC - 图119 of the system of linear equations is identically zero, the system certainly has a trivial solution: 23-DEC - 图120. (the zero solution). So in this case, we are interested in the question that “are there any other solution”? Moreover, if there is a nonzero solution 23-DEC - 图121 (say), then any multiple of 23-DEC - 图122 is also a solution: let 23-DEC - 图123 be an arbitrary constant, then

    23-DEC - 图124%20%3D%20%5Clambda%20(Cv)%3D%5Clambda%20%5Cmathbf%7B0%7D%20%3D%20%5Cmathbf%7B0%7D.%0A#card=math&code=C%28%5Clambda%20v%29%20%3D%20%5Clambda%20%28Cv%29%3D%5Clambda%20%5Cmathbf%7B0%7D%20%3D%20%5Cmathbf%7B0%7D.%0A&id=Yta1I)

    The algorithm to this question is still the Gaussian elimination. It is easy to see that the existence of free variables will give numerous solution.


    The ultimate result is:

    Theorem: Denote the augmented matrix of a system of linear equations 23-DEC - 图125 by 23-DEC - 图126. Suppose that 23-DEC - 图127 is an 23-DEC - 图128 matrix 23-DEC - 图129 and has 23-DEC - 图130#card=math&code=r%28C%29&id=DBV3R) pivots in its RREF. Suppose 23-DEC - 图131 has 23-DEC - 图132#card=math&code=r%28A%29&id=JKgNI) pivots in its RREF. Then the system has

    1. no solution if and only if 23-DEC - 图133%20%3C%20r(A)#card=math&code=r%28C%29%20%3C%20r%28A%29&id=AuUs6);
    2. a unique solution if and only if 23-DEC - 图134%3Dr(A)%3Dn#card=math&code=r%28C%29%3Dr%28A%29%3Dn&id=R9fcV);
    3. more than one solution if and only if 23-DEC - 图135%3Dr(A)%3Cn#card=math&code=r%28C%29%3Dr%28A%29%3Cn&id=lwFDz).

    Let us illustrate this theorem by using the following toy example: we consider the equation 23-DEC - 图136, where 23-DEC - 图137 are constants. Then 23-DEC - 图138. Here 23-DEC - 图139.

    1. If 23-DEC - 图140%3Cr(A)#card=math&code=r%28C%29%3Cr%28A%29&id=tem59), this can only happend if 23-DEC - 图141 but 23-DEC - 图142. In this case, the equation 23-DEC - 图143 becomes 23-DEC - 图144, which is inconsistent, and hence no solution.
    2. If 23-DEC - 图145%3Dr(A)%3D1#card=math&code=r%28C%29%3Dr%28A%29%3D1&id=ojTAq), this can only happend if 23-DEC - 图146 (Note that if 23-DEC - 图147, then whehter 23-DEC - 图148 is zero or not, is not a matter). In this case, the equation 23-DEC - 图149 has a unique solution 23-DEC - 图150.
    3. If 23-DEC - 图151%3Dr(A)%3D0#card=math&code=r%28C%29%3Dr%28A%29%3D0&id=Up051), this can only happen if 23-DEC - 图152. The equation becomes 23-DEC - 图153. Clearly, any number is a solution. So numerous solutions.