Partial preview of the text
Download B.Tech 1st Year Maths Matrices and Eigen values and vectors Notes and more Study notes Mathematics in PDF only on Docsity!
JNTUH Chapte TELANGANA 81. Introduction 02. Types of Matrices 03. Operations 04. Transpose & Special 05. Determinants 86. Adjoint & Inverse 87. Rank 68. Echelon Form 69. LU Decomposition 168. System of Equations 11. Gauss-Seidel 12. Eigenvalues & Eigenvectors 13. Complex Matrix Eigen 14. Cayley-Hamilton 15. Powers of Matrix 16. Modal & Spectral Matrix 17. Linear & Orthogonal Transform 18. Quadratic Forms 19. Sylvester's Law & SVD 20. Condition Number we. *& Quick Revision Foundations gg Introduction to Matrices Definition: A matrix is a rectangular array of numbers (real or complex), arranged in m rows andn columns, enclosed in square brackets. It is denoted by a capital letter such as A, B, C. A general m xn matrix Ais written as: A= [asian =f ay Ay -*- Ay || Aa Az *** Aan | | * + * LL am: Ame *** Amn J where i = 1, 2, .. , M (row index) j = 1, 2, . , nm (column index) ORDER OF A MATRIX The order (or size) of a matrix is written as m « n (read:"mbyn"). Here m =number of rows and n = number of columns. Write a 2x3 matrix with elements aij =i+ 2]. Solution: a,,=1+2=3 a,,=1+4=5 a,,=1+6=7 @2,—=2+2=4 agg=2t+4=6 a3 =21+6=8 A=[357]1468] gg Types of Matrices Type Description Condition Row Matrix Only 1 row m=1 Column Matrix Only 1 column n=1 Square Matrix Rows = Columns m=n Null / Zero Matrix All elements are 0 aij=O0 V Lj Diagonal Matrix Non-diagonal elements are 0 aij=Ofori*j Scalar Matrix Diagonal matrix with all diagonal elements equal aii=k, aij =0 Identity / Unit Matrix (I) Diagonal elements = 1, rest = 0 aij = 1if ij, else 0 Upper Triangular Elements below main diagonal are 0 aij=Ofori>] Lower Triangular Elements above main diagonal are 0 aij=0 fori sum of |aij| for j+i) oe Start with initial guess: x,9=x,° = x,°=0 (usually) 6 Substitute into the rearranged equations to get new values t « ] Use the latest updated values immediately in the same iteration rs | Repeat until |xi(new) — xi(old)| < ¢ (desired accuracy) 14.2 Diagonal Dominance (Convergence Condition) A matrix is diagonally dominant if for every row i: lai! = 21 lal If strictly dominant, Gauss-Seidel is guaranteed to converge. 4s Difference from Gauss-Jacobi: In Gauss-Jacobi, old values are used throughout one iteration. In Gauss-Seidel, updated (latest) values are used immediately — so Gauss-Seidel converges faster. EXAMPLE 13 - GAUSS-SEIDEL (2 ITERATIONS) Solve: 5x +y=11, x+5y=13. Starting guess x=y=0. Solution: Rearranged: x = (11 - y) / 5 y = (15 - x) / 5 Iteration 1: x? = (13 - 2.2) / 5 = 10.8/5 = 2.16 Iteration 2: x? (13 - 1.768) 5 = 11.252/5 = - 1.751) / 5 9 Converging to: x = 1.75, y gg Eigenvalues & Eigenvectors of Complex Matrices 19.1 Recap: Complex Matrix Types Matrix Condition Real analog Hermitian AM = A (aij = ji) Symmetric Skew-Hermitian AH=-A Skew-Symmetric Unitary AAN=7(A-'= AH) Orthogonal 19.2 Properties of Eigenvalues of Complex Matrices Hermitian Matrix: + ALL eigenvalues are real + Eigenvectors for distinct eigenvalues are orth al » Can always be diagonalized by a unitary matrix Skew-Hermitian Matrix: + ALL eigenvalues are or zero (of the form A = iB where B is real) Unitary Matrix: + ALL eigenvalues have modulus 1 (|A| = 1) * They lie on the unit circle in the complex plane 19.3 Finding Eigenvalues of a Hermitian Matrix EXAMPLE 19 — HERMITIAN MATRIX EIGENVALUES Find eigenvalues of A = [[2, 1+i], [1-i, 3] Verify Hermitian: AH = (A)T = [[2, 1+i],[1-i, 3]] =A Vv Characteristic equation: det(A - AI) Q |(2-A) (1+1) | |(1-1) (3-A) | = © (2-A)(3-A) - (141) (1-1) = 6 (2-A)(3-A) - (1 - 17) = © (2-A)(3-A) - (1 + 1) = © (2-A)(3-A) - 2 =66 - BA + A? = 0 A? - 5A + 4 = 8 (A-1)(A-4) = 6 Elgenvalues: A, = 1, A, = 4 (both real 7) 19.4 Unitary Diagonalization A complex matrix A is unitarily diagonalizable if there exists a unitary matrix U such that: uHau = D (diagonal) Every Hermitian matrix is unitarily diagonalizable. Key Theorem: Hermitian matrices are the complex generalization of real symmetric matrices. All results for symmetric matrices (real eigenvalues, orthogonal eigenvectors, orthogonal diagonalization) carry over to Hermitian matrices with "orthogonal" replaced by "unitary." gy Cayley-Hamilton Theorem Theorem: Every square matrix satisfies its own characteristic equation. If the characteristic equation of A is p(A) =0, then p(A) = 0 (the zero matrix). For a 2x2 matrix A with characteristic equation: A? - (trace)A + det(A) = 0 Then: A? - (trace)-A + det(A)-I APPLICATIONS OF CAYLEY-HAMILTON THEOREM * Finding A~’ without computing adjoint * Computing higher powers of A (A") * Expressing A" as a linear combination of lower powers EXAMPLE 9 — CAYLEY-HAMILTON If A= [[1,2],[2,1]], verify Cayley-Hamilton and find A™. Solution: Characteristic equation: |A-AI| = (1 -A)? f 2 3 = 0 By Cayley-Hamilton: A? - 2A - 31 = O Verify A®: A? = [1-1+2-2 1-2 = [5 4] [2-1+1-2 2-2+1:1] [4 5] A? - 2A - SI = [5 4] - [2 4] - [3 8] = [9 8] v 14 5] 14 2] [O 3] [8 OJ Finding A-?: Multiply A2 - 2A - @ by At: A - 21 - 34-2? = @ A+ = (A - 2 ( -1 2] | 2 -1) gy Modal Matrix & Spectral Matrix Modal Matrix (P): The matrix whose columns are the eigenvectors of A, arranged in order corresponding to eigenvalues A,, Az, .., An. Also called the eigenvector matrix. Spectral Matrix (D): The diagonal matrix with eigenvalues on the main diagonal (in the same order as the eigenvectors in P): D = diaglA,, As, «=, An) Also called the eigenvalue matrix. If P = [X, | X, | » | X,] (modal matrix) D = diag(A,, A,, «=, A,) (spectral matrix) Then: AP = PD Diagonalization: P-*AP = D OR A = PDP-* For symmetric A with orthogonal P: PTAP = D SPECTRAL DECOMPOSITION (SPECTRAL THEOREM) Any real symmetric matrix A can be written as: A = A,X{X)T + ASK OMT + uu + AnXnXnl This is called the spectral decomposition of A. EXAMPLE 15 — MODAL & SPECTRAL MATRIX Find modal and spectral matrices of A = [[4,1],[2,3]] Solution: From earlier: A, = 5, X, = [1,1]’ A, = 2, X, = [1,-2]™ Modal matrix P = [1 1] |1 -2] Spectral matrix D = [5 0] [8 2) Verify: P-*AP = D det(P) = -2-1 = -3 P+ = (1/-3)[-2 -1] = [2/3 1/3] |-1 1) 1/3 -1/3] P-*AP = [5 9] = Dv [Oo 2] gg Linear Transformation & Orthogonal Transformation 15.1 Linear Transformation A linear transformation T: R" — R™ is a function that maps vectors, satisfying: (i) TUu+v) =T(u)+ Tv) (Additivity) (ii) T(cu) =c-T(u) (Homogeneity) Every linear transformation can be represented as Y = AX, where A is the transformation matrix. Standard form: Y = AX where X € R" (input vector), Y € R™ (output vector) A is an mxn matrix Example (rotation by 8 in 2D): A = [cos 6 -sin 6] [sin @ 8] IMPORTANT TERMS Term Definition Kernel / Null Space Set of all X such that AX = 0; dimension = nullity Range / Image Set of all possible outputs Y = AX Rank-Nullity Theorem rank(A) + nullity(A) =n (number of columns) 15.2 Orthogonal Transformation An orthogonal transformation is a linear transformation Y = PX where P is an orthogonal matrix (PP! = I, so P-? =P"). It preserves lengths and angles — i.e., it represents rotations and reflections. P is orthogonal if: PP’ = P™TP = I — P+ = P' det(P) = +1 Properties preserved under orthogonal transformation: + Length: |PX] = |X| + Inner product: (PX)-(PY) = X-Y + Angle between vectors 15.3 Orthogonal Transformation for Quadratic Forms To reduce a quadratic form Q = X'AX to canonical form using orthogonal transformation X = PY: Find eigenvalues A,, Az, A, of Symmetric matrix A Find corresponding eigenvectors X,, X,, X; Normalize each eigenvector: Xi = Xi / [Xi| Form orthogonal matrix P = IX, x | X,] (columns = normalized eigenvectors) Apply X= PY — Q=)yy,> + heya? + Asya" Key: Eigenvectors of a real symmetric matrix corresponding to distinct eigenvalues are always orthogonal to each other. If eigenvalues repeat, apply Gram-Schmidt orthogonalization. EXAMPLE 14 — ORTHOGONAL TRANSFORMATION Reduce Q = 2x* + 2y* + 22 + 2xy to canonical form. Solution: Matrix of Q: A = [2 1 6] |1 2 6] [8 © 2) Characteristic equation: det(A-AI) = @ (2-A) [(2-A)? - 8] - 1[(€2-A)-1 - 6] = © Wait — expand properly: = (2-A)[(2-A)(2-A) - 1] = 0 [last row/col gives factor] Full expansion: -A3 + 6A? - 11A +6=0.A=1, 2, 3 Canonical form: Q = 1-y,? + 2-y,? + 3-y,? Nature: ALLA >O6 gy Sylvester's Law of Inertia & Singular Value Decomposition 18.1 Sylvester's Law of Inertia Sylvester's Law of Inertia: When a real quadratic form is reduced to a sum of squares by any non- singular linear transformation, the number of positive terms, negative terms, and zero terms remains the same regardless of the transformation used. For a quadratic form of rank r, index p: Canonical Form: Q = y,? + yo? + » + Yp? - You? - yr? where: p = Index = number of positive terms = number of positive eigenvalues r - p = number of negative terms n - r = number of zero terms Signature s = (number of +ve eigenvalues) - (number of -ve eigenvalues) = p - (r - p) = 2p-r Nature Signature s Positive Definite p=n r=n s=n Negative Definite p=0 r=n s=-n Positive Semi-Definite p=r 0 V = orthogonal matrix of right singular vectors (columns = eigenvectors of ATA) STEPS TO COMPUTE 8VD i) Compute ATA (nxn symmetric matrix) Find eigenvalues A, >A, 2... 2A, of ATA | singular values oi = vAi Find eigenvectors of ATA — columns of V Compute ui = Avi/oi for o5 0 — columns of U Form =: put o,, 05, ... on the main diagonal APPLICATIONS OF SVD * Image compression — keep only top k singular values « Data reduction / PCA — principal component analysis * Solving least squares problems * Computing pseudo-inverse of non-square matrices « Noise reduction in signal processing Rank of A = number of non-zero singular values Pseudo-inverse (Moore-Penrose): A+ = where 3* replaces each non-zero o with 1/9 gy Condition Number of a Matrix The condition number of a matrix A measures how sensitive the solution X of AX = B is to small changes or errors in B (or in A). A large condition number means the matrix is ill-conditioned (small errors get amplified). Condition number kK(A) = |All « /A-7*]] Using spectral norm (based on eigenvalues of ATA): ' g_min where o_max and o_min are the Largest and smallest singular values. For a symmetric positive definite matrix: 20.1 Interpretation Condition Number Interpretation x(A)=1 Pertectly conditioned (e.g., identity matrix) «(A) close to 1 Well-conditioned — small errors stay small «(A) very large Ill-conditioned — small errors get magnified (A) = 0 Singular matrix (no inverse) 20.2 Relation to Rank If any singular value oj = 0 — A is singular = k(A) = » Condition number of rank: The effective rank of a matrix can be determined by the number of singular values that are significantly Larger than machine epsilon €. Singular values below threshold = o_max x € are treated as zero. EXAMPLE 20 — CONDITION NUMBER Find condition number of A= [[3,1],[1,3]] Solution: A is symmetric, so eigenvalues = singular values: A? - 6A +8=6 — A, = 4, A, = 3 = A_max / A_min = 4/2 = 2 Well-conditioned matrix (k close to 1). Exam Note: Condition number questions in JNTUH typically ask you to find it from eigenvalues of symmetric matrices, or from singular values. Know the formula x = A_max/i_min for symmetric positive definite matrices.