Linear Algebra Lecture Notes - Comprehensive Lecture Notes Semester Lecture Notes

Systems of Linear Equations and Row Operations

  • Definition of Linear Equation: A linear equation in nn variables, x1,x2,,xnx_1, x_2, \dots, x_n, is an equation of the form a1x1+a2x2++anxn=ba_1x_1 + a_2x_2 + \dots + a_nx_n = b, where the coefficients a1,,ana_1, \dots, a_n and the constant term bb are constants.

  • Definition of Linear System: A finite collection of linear equations in the variables x1,x2,,xnx_1, x_2, \dots, x_n is called a system of linear equations or a linear system.

    • Example:

      • x1+5x2+6x3=100x_1 + 5x_2 + 6x_3 = 100

      • x2x3=1x_2 - x_3 = -1

      • x1+x3=11-x_1 + x_3 = 11

  • Homogeneous Linear System: A system is called homogeneous if all the constants on the right-hand side are zero (bi=0b_i = 0 for all equations).

  • Solution of a System: A set of values for the variables x1,,xnx_1, \dots, x_n that satisfies every equation in the system.

Matrix Representations of Linear Systems

  • Matrix: A rectangular array of numbers. An m×nm \times n matrix has mm rows and nn columns.

  • Coefficient Matrix: Formed from the coefficients of the variables in the equations.

  • Augmented Matrix: Formed from the coefficients and the constant terms, typically separated by a vertical line: [Ab][A | b].

  • Elementary Row Operations: Operations that simplify the augmented matrix without changing the solution set:

    1. Interchanging two rows (RiRjR_i \leftrightarrow R_j).

    2. Multiplying a row by a non-zero constant (RikRiR_i \rightarrow kR_i, where k0k \neq 0).

    3. Adding a multiple of one row to another row (RiRi+kRjR_i \rightarrow R_i + kR_j).

  • Equivalence: Matrices produced after row operations are equivalent, denoted by \sim, meaning they share the same solution set.

Row-Echelon Form and Elimination

  • Leading Entry: The first non-zero entry in each row of a matrix.

  • Row-Echelon Form (REF): A matrix is in REF if:

    1. The leading entry of a lower row is further to the right than the leading entry in the higher row.

    2. Zero rows are grouped at the bottom.

  • Reduced Row-Echelon Form (RREF): A matrix is in RREF if:

    1. It is in REF.

    2. Each leading entry is exactly 11.

    3. In each column containing a leading 11, all other entries are zero.

  • Gaussian Elimination: A systematic way to reduce a matrix to REF. It involves creating zeros below leading entries. The solution is then found via back substitution.

  • Gauss-Jordan Elimination: Reduces a matrix to RREF uniquely. It involves creating leading ones and zeros above each leading one.

Consistency and Solutions

  • Existence of Solutions: A system has zero solutions (inconsistent), one solution (consistent), or infinitely many solutions (consistent).

  • Inconsistency Condition: A system is inconsistent if and only if the REF of its augmented matrix has a row with all zero entries except for a non-zero final constant term (0=b0 = b where b0b \neq 0).

  • Homogeneous System Consistency: Every homogeneous system is consistent because it always has the trivial solution (x1=0,,xn=0x_1 = 0, \dots, x_n = 0).

  • Parameters for Infinite Solutions: If a consistent system has nn variables and rr non-zero rows in the REF, then nrn - r parameters are needed to specify the solution set. Columns without leading entries correspond to free variables.

  • Superposition of Solutions: If Ax=bAx = b is consistent, the general solution is x=p+hx = p + h, where pp is a particular solution to Ax=bAx = b and hh is the general solution to the homogeneous system Ax=0Ax = 0.

Matrix Operations and Properties

  • Special Matrices:

    • Square Matrix: Number of rows equals number of columns.

    • Diagonal Matrix: Aij=0A_{ij} = 0 for iji \neq j.

    • Upper Triangular: Aij=0A_{ij} = 0 for i>ji > j.

    • Lower Triangular: Aij=0A_{ij} = 0 for i<ji < j.

    • Zero Matrix (00): All entries are zero.

    • Identity Matrix (InI_n): Aij=1A_{ij} = 1 if i=ji=j and 00 if iji \neq j.

  • Matrix Multiplication: The product ABAB is defined if columns in AA equals rows in BB. Entry (AB)ij=k=1nAikBkj(AB)_{ij} = \sum_{k=1}^n A_{ik}B_{kj}.

  • Properties:

    • A(B+C)=AB+ACA(B + C) = AB + AC

    • A(BC)=(AB)CA(BC) = (AB)C

    • AIn=AA I_n = A

    • Note: Generally, ABBAAB \neq BA.

  • Trace: Tr(A)=i=1nAii\text{Tr}(A) = \sum_{i=1}^n A_{ii}.

  • Transpose (ATA^T): Interchanging rows and columns (AijT=AjiA^T_{ij} = A_{ji}).

    • (AB)T=BTAT(AB)^T = B^T A^T.

Matrix Inverses

  • Definition: An n×nn \times n matrix AA is invertible if there exists a matrix BB such that AB=BA=InAB = BA = I_n. BB is denoted A1A^{-1}.

  • 2x2 Inverse Formula: If A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, then A1=1adbc(dbca)A^{-1} = \frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}, provided adbc0ad - bc \neq 0.

  • Invertibility Condition: AA is invertible if and only if its RREF is InI_n or its determinant is non-zero.

  • Properties:

    • (AB)1=B1A1(AB)^{-1} = B^{-1} A^{-1}.

    • (AT)1=(A1)T(A^T)^{-1} = (A^{-1})^T.

  • Elementary Matrices: Matrices obtained by performing a single row operation on InI_n. Multiplying AA on the left by an elementary matrix EE is equivalent to performing the row operation on AA.

Rank and Determinants

  • Rank: The number of non-zero rows in the REF of a matrix.

    • rank(A)m\text{rank}(A) \le m and rank(A)n\text{rank}(A) \le n.

  • Determinant (n x n): A function mapping square matrices to scalars.

    • Rules: Swapping two rows multiplies determinant by 1-1. Multiplying a row by α\alpha multiplies it by α\alpha. Adding a multiple of one row to another doesn't change it. det(In)=1\det(I_n) = 1.

    • For triangular matrices, det(A)\det(A) is the product of diagonal entries.

  • Properties:

    • det(AB)=det(A)det(B)\det(AB) = \det(A)\det(B).

    • det(AT)=det(A)\det(A^T) = \det(A).

    • det(αA)=αndet(A)\det(\alpha A) = \alpha^n \det(A).

  • Cofactor Expansion:

    • Cofactor: Cij=(1)i+jdet(A(i,j))C_{ij} = (-1)^{i+j} \det(A(i,j)) where A(i,j)A(i,j) is AA without row ii and column jj.

    • det(A)=k=1nAikCik\det(A) = \sum_{k=1}^n A_{ik}C_{ik} (expansion along ii-th row).

Euclidean Vector Spaces

  • Vectors in Rn\mathbb{R}^n: Ordered n-tuples of real numbers (v1,v2,,vn)(v_1, v_2, \dots, v_n).

  • Norm (Length): u=u12+u22++un2\|u\| = \sqrt{u_1^2 + u_2^2 + \dots + u_n^2}.

  • Dot Product: uv=ukvk=uvcos(θ)u \cdot v = \sum u_k v_k = \|u\| \|v\| \cos(\theta).

    • Cauchy-Schwarz Inequality: uvuv|u \cdot v| \le \|u\| \|v\|.

  • Orthogonality: Two vectors are orthogonal if uv=0u \cdot v = 0.

  • Vector Projection: projuv=uvu2u\text{proj}_u v = \frac{u \cdot v}{\|u\|^2} u.

  • Cross Product (R3\mathbb{R}^3 only): Result is a vector perpendicular to both uu and vv. Magnitude equals area of the parallelogram spanned by uu and vv.

  • Scalar Triple Product: u(v×w)u \cdot (v \times w) is the volume of the parallelepiped spanned by them (absolute value).

Lines and Planes

  • Lines: Vector equation r=r0+tvr = r_0 + tv. Parametric: x=x0+ta,y=y0+tb,z=z0+tcx = x_0 + ta, y = y_0 + tb, z = z_0 + tc.

  • Planes: Vector equation r=r0+su+tvr = r_0 + su + tv. Point-normal form: (rr0)n=0(r - r_0) \cdot n = 0. Cartesian: ax+by+cz=dax + by + cz = d, where n=(a,b,c)n = (a, b, c).

  • Geometric Intersection: Linear algebra methods (Gaussian elimination) are used to find intersection points of multiple planes or lines/planes.

General Vector Spaces

  • Definition: A set VV with vector addition and scalar multiplication satisfying 10 axioms (closure, associativity, commutativity, existence of zero, additive inverse, distributivity, etc.).

  • Examples: Rn\mathbb{R}^n, Mm,nM_{m,n}, PnP_n (polynomials of degree at most nn), and function spaces F(S,R)F(S, \mathbb{R}).

  • Complex Vector Spaces: Use complex scalars C\mathbb{C}.

  • Integers Modulo 2 (F2\mathbb{F}_2): Field containing {0,1}\{0, 1\}, used in coding theory (e.g., Hamming code).

Subspaces, Spans, and Independence

  • Subspace: A subset that is itself a vector space. Must contain 00 and be closed under addition and scalar multiplication.

  • Span: The set of all linear combinations of vectors in a set.

  • Linear Independence: A set of vectors is independent if αivi=0\sum \alpha_i v_i = 0 implies all αi=0\alpha_i = 0.

    • In Rn\mathbb{R}^n, if number of vectors k>nk > n, they are linearly dependent.

  • Basis: A linearly independent set that spans the space.

  • Dimension (dim(V)\dim(V)): The number of vectors in a basis.

    • dim(Rn)=n\dim(\mathbb{R}^n) = n, dim(Mm,n)=mn\dim(M_{m,n}) = mn, dim(Pn)=n+1\dim(P_n) = n+1.

Rank-Nullity and Matrix Spaces

  • Column Space: Subspace of FmF^m spanned by columns of AA.

  • Row Space: Subspace of FnF^n spanned by rows of AA.

  • Solution Space (Nullspace): Subspace formed by solutions to Ax=0Ax = 0.

  • Rank-Nullity Theorem: For an m×nm \times n matrix, rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n (total columns).

  • Coordinates: If B={v1,,vn}B = \{v_1, \dots, v_n\} is an ordered basis, any vv has unique coordinates [v]B[v]_B.

Linear Transformations

  • Definition: Function T:UVT: U \rightarrow V such that T(u+v)=T(u)+T(v)T(u+v) = T(u)+T(v) and T(αu)=αT(u)T(\alpha u) = \alpha T(u).

  • Standard Matrix Representation: [T]=[T(e1)T(e2)T(en)][T] = [T(e_1) | T(e_2) | \dots | T(e_n)]

  • Kernel (ker(T)): Set of vectors uu such that T(u)=0T(u) = 0.

  • Image (im(T)): Set of vectors vv such that v=T(u)v = T(u).

  • Composition: Matrix representation of RSR \circ S is the product [R][S][R][S].

  • Change of Basis: Transition matrix PC,BP_{C,B} such that [v]C=PC,B[v]B[v]_C = P_{C,B}[v]_B.

    • [T]B=PB,C[T]CPC,B[T]_B = P_{B,C} [T]_C P_{C,B}.

Eigenvalues and Eigenvectors

  • Definitions: Av=λvAv = \lambda v for non-zero vv. λ\lambda is the eigenvalue, vv is the eigenvector.

  • Characterisic Equation: det(AλI)=0\det(A - \lambda I) = 0.

  • Multiplicity: Algebraic (multiplicity of root in poly) vs. Geometric (dimension of eigenspace).

  • Diagonalization: A=PDP1A = PDP^{-1} where DD is diagonal (Dii=λiD_{ii} = \lambda_i) and PP contains eigenvectors as columns.

    • Requires nn linearly independent eigenvectors.

  • Matrix Powers: Ak=PDkP1A^k = P D^k P^{-1}.

  • Genetics Application: Transition matrices can predict genotype frequencies over generations (Markov chains).

Inner Product Spaces

  • Inner Product (Real): Generalizes dot product. Requisite properties: symmetry, linearity, and positivity.

  • Complex (Hermitian) Inner Product: u,v=v,u\langle u, v \rangle = \overline{\langle v, u \rangle}. Requires complex conjugates: uv=ukvku \cdot v = \sum u_k \overline{v_k}.

  • Orthonormal Sets: Orthogonal set where each vector has unit length.

  • Gram-Schmidt Procedure: Converts any basis into an orthonormal basis step-by-step.

  • Least Squares: Solving ATAu=ATyA^T A u = A^T y to find the line of best fit by minimizing (yi(a+bxi))2\sum (y_i - (a+bx_i))^2.

  • Orthogonal Matrices (QQ): QT=Q1Q^T = Q^{-1}. Preserves distances and angles.

  • Symmetric Matrices: Real symmetric matrices are always orthogonally diagonalizable (A=QDQTA = Q D Q^T).

  • Singular Value Decomposition (SVD): A=USVTA = U S V^T, where U,VU, V are orthogonal and SS contains singular values (square roots of eigenvalues of ATAA^T A).

  • Hermitian Matrices: A=AA^* = A. All eigenvalues are real and they are unitary diagonalizable (A=UDUA = U D U^*).