Introduction to Matlab Programming with Applications

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Matlab Programming with Applications Matrix Multiplication Let A be l × m matrix, and B be m × n matrix. Then C = A × B is given by m X cij = aik × bkj ; (1) k=1 where aik ; bkj ; cij are defined as before. Zheng-Liang Lu 312 / 354 For example, Pm Note that if n = 1, then cij = k=1 aik × bkj becomes the matrix A times the vector B. Zheng-Liang Lu 313 / 354 Example l×m m×n Let A 2 R and B 2 R . Please implement a program that A multiplies B and compare your result to A × B provided in MATLAB. For simplicity, the dimensions l; m; n are the inputs to generate random matrices by rand. Input: l; m; n for [A]l×m and [B]m×n Output: A × B Zheng-Liang Lu 314 / 354 1 clear; clc; 2 % main 3 l = randi(5, 1);%A flxm g 4 m = randi(5, 1);%B fmxn g 5 n = randi(5, 1); 6 A = randi(10, l, m); 7 B = randi(10, m, n); 8 C = zeros(size(A, 1), size(B, 2)); 9 for i = 1 : 1 : size(A, 1) 10 for j = 1 : 1 : size(B, 2) 11 for k = 1 : 1 : size(A, 2) 12 C(i, j) = C(i, j) + A(i, k) * B(k, j); 13 end 14 end 15 end Time complexity: O(n3) Strassen (1969): O(n2:807355) Coppersmith and Winograd (2010): O(n2:375477) Zheng-Liang Lu 315 / 354 Matrix Exponentiation Raising a matrix to a power is equivalent to repeatedly multiplying the matrix by itself. For example, A2 = A × A. Note that A should be a square matrix. (Why?) In mathematics, the matrix exponential1 is a matrix function on square matrices analogous to the ordinary exponential function. That is, f (A) = eA, similar to f (x) = ex . However, raising a matrix to a matrix power, that is, AB , is undefined. 1See matrix exponential and Pauli matrices. Zheng-Liang Lu 316 / 354 Example Be aware that exp(X ) and exp(1)X are different for any matrix X . 1 clear; clc; 2 % main 3 X = [0 1; 1 0]; 4 mat exp1 = exp(1) ˆ X 5 mat exp2 = 0; 6 for i = 1 : 10% check the identity ofeˆa 7 mat exp2 = mat exp2 + X ˆ (i - 1) / ... factorial(i - 1); 8 end 9 mat exp2 10 mat exp3 = exp(X)% different? Zheng-Liang Lu 317 / 354 1 mat exp1 = 2 3 1.5431 1.1752 4 1.1752 1.5431 5 6 7 mat exp2 = 8 9 1.5431 1.1752 10 1.1752 1.5431 11 12 13 mat exp3 = 14 15 1.0000 2.7183 16 2.7183 1.0000 Zheng-Liang Lu 318 / 354 Determinant det(A) is the determinant of the square matrix A.2 a b Recall that if A = , then det(A) = ad − bc. c d det(A) can calculate the determinant of A. For example, 1 clear; clc; 2 % main 3 A = magic(3); 4 det(A) 2In math, jAj also denotes det(A). Zheng-Liang Lu 319 / 354 Actually, a general formula3 for determinant is somehow complicated. You can try a recursive algorithm to calculate the determinant for any n-by-n matrices. 3See determinant. Zheng-Liang Lu 320 / 354 Recursive Algorithm for Determinant 1 function y = myDet(X) 2 [r, c] = size(X); 3 if isequal(r,c)% checkr==c? 4 if c == 1 5 y = X; 6 elseif c == 2 7 y = X(1, 1) * X(2, 2) - X(1, 2) * X(2, 1); 8 else 9 fori=1:c 10 if i == 1 11 % recall thatc ==r 12 y = X(1, 1) * myDet(X(2 : c, 2 : c)); 13 elseif (i > 1 && i < c) 14 y = y + X(1, i) * (-1)ˆ(i + 1) *... 15 myDet(X(2 : c, [1 : i-1, i + 1 : ... c])); 16 else Zheng-Liang Lu 321 / 354 17 y = y + X(1, c) * (-1)ˆ(c + 1) * ... myDet(X(2 : c, 1 : c - 1)); 18 end 19 end 20 end 21 else 22 error('Should bea square matrix.') 23 end Obviously, there are n! terms in the calculation. So, this algorithm runs in O(en log n). Try any 10-by-10 matrix. Compare the running time with det.4 4By LU decomposition with running time O(n3). Zheng-Liang Lu 322 / 354 Inverse Matrices In linear algebra, an n-by-n square matrix A is invertible if there exists an n-by-n square matrix B such that AB = BA = In; where In denotes the n-by-n identity matrix. Note that eye is similar to zeros and returns an identity matrix. The following statements are equivalent: A is invertible det(A) 6= 0 (nonsingular) A is full rank5 5See rank. Zheng-Liang Lu 323 / 354 inv(A) returns an inverse matrix of A. Note that inv(A) may return inf if A is badly scaled or nearly singular.6. So, if A is not invertible, then det(A) = 0. It is well-known that adj(A) A−1 = ; det(A) where adj(A) refers to the adjugate matrix of A. You can try to calculate an adjugate matrix7 for any n-by-n matrix. (Try.) 6That is, det(A) is near 0. 7See adjugate matrix. Zheng-Liang Lu 324 / 354 Example 1 clear; clc 2 % main 3 A = pascal(4);% Pascal matrix 4 B = inv(A) 1 >> B = 2 3 4.0000 -6.0000 4.0000 -1.0000 4 -6.0000 14.0000 -11.0000 3.0000 5 4.0000 -11.0000 10.0000 -3.0000 6 -1.0000 3.0000 -3.0000 1.0000 Try inv(magic(3)). Zheng-Liang Lu 325 / 354 System of Linear Equations A system of linear equations is a set of linear equations involving the same set of variables. For example, 8 < 3x +2y −z = 1 x −y +2z = −1 : −2x +y −2z = 0 After doing math, we have x = 1; y = −2; and z = −2. Zheng-Liang Lu 326 / 354 A general system of m linear equations with n unknowns can be written as 8 a11x1 +a12x2 ··· +a1nxn = b1 > <> a21x1 +a22x2 ··· +a2nxn = b2 . .. > . = . > : am1x1 +am2x2 ··· +amnxn = bm where x1;:::; xn are unknowns, a11;:::; amn are the coefficients of the system, and b1;:::; bm are the constant terms. Zheng-Liang Lu 327 / 354 So, we can rewrite the system of linear equations as a matrix equation, given by Ax = b: where 2 3 a11 a12 ··· a1n 6 a21 a22 ··· a2n 7 A = 6 7 ; 6 . .. 7 4 . 5 am1 am2 ··· amn 2 3 x1 6 . 7 x = 4 . 5 ; and xn 2 3 b1 6 . 7 b = 4 . 5 : bm Zheng-Liang Lu 328 / 354 General System of Linear Equations Let x be the column vector with n independent variables and m constraints.8 If m = n9, then there exists the unique solution x0. If m > n, then there is no exact solution but there exists one least-squares error solution such that kAx0 − bk2 is minimal. Let x 0 be the least-square error solution. Then the error is = Ax 0 − b, usually not zero. So, kAx 0 − bk2 = (Ax 0 − b)(Ax 0 − b) = 2 is minimal. If m < n, then there are infinitely many solutions. 8Assume that these equations are linearly independent. 9Equivalently, rank(A) = rank([A b]). Or, see Cramer's rule. Zheng-Liang Lu 329 / 354 Quick Glance at Method of Least Squares The method of least squares is a standard approach to the approximate solution of overdetermined systems. Zheng-Liang Lu 330 / 354 Matrix Division in MATLAB Consider Ax = b for a system of linear equations. Anb is the matrix division of A into B, which is roughly the same as inv(A)b, except that it is computed in a different way. Left matrix divide (n) or mldivide is to do x =A−1b =inv(A)b =Anb: Zheng-Liang Lu 331 / 354 Unique Solution (m = n) For example, 8 < 3x +2y −z = 1 x −y +2z = −1 : −2x +y −2z = 0 1 >> A = [3 2 -1; 1 -1 2; -2 1 -2]; 2 >> b = [1; -1; 0]; 3 >> x = A n b 4 5 1 6 -2 7 -2 Zheng-Liang Lu 332 / 354 Overdetermined System (m > n) For example, 8 < 2x −y = 2 x −2y = −2 : x +y = 1 1 >> A=[2 -1; 1 -2; 1 1]; 2 >> b=[2; -2; 1]; 3 >> x = A n b 4 5 1 6 1 Zheng-Liang Lu 333 / 354 Underdetermined System (m < n) For example, x +2y +3z = 7 4x +5y +6z = 8 1 >> A = [1 2 3; 4 5 6]; 2 >> b = [7; 8]; 3 >> x = A n b 4 5 -3 6 0 7 3.333 8 9 %(Why?) Zheng-Liang Lu 334 / 354 Gauss Elimination Recall the Gauss Elimination in high school. For example, 8 < 3x +2y −z = 1 x −y +2z = −1 : −2x +y −2z = 0 It is known that x = 1; y = −2; and z = −2. Zheng-Liang Lu 335 / 354 Check if det(A) = 0, then the program terminates; otherwise, the program continues. Loop to form upper triangular matrix which looks like 2 3 1 ¯a12 ··· ¯a1n 6 0 1 ··· ¯a2n 7 A¯ = 6 7 ; 6 . 7 4 . 1 . 5 0 0 ··· 1 and 2 3 b¯1 6 b¯2 7 b¯ = 6 7 : 6 . 7 4 . 5 b¯n where ¯aij s and b¯i s are the resulting values. Zheng-Liang Lu 336 / 354 Use backward substitution to determine the solution vector x by xn = b¯n; n X xi = b¯i − ¯aij xj ; j=i+1 where i 2 f1; ··· ; n − 1g.
Recommended publications
  • Linear Algebra: Example Sheet 2 of 4
    Michaelmas Term 2014 SJW Linear Algebra: Example Sheet 2 of 4 1. (Another proof of the row rank column rank equality.) Let A be an m × n matrix of (column) rank r. Show that r is the least integer for which A factorises as A = BC with B 2 Matm;r(F) and C 2 Matr;n(F). Using the fact that (BC)T = CT BT , deduce that the (column) rank of AT equals r. 2. Write down the three types of elementary matrices and find their inverses. Show that an n × n matrix A is invertible if and only if it can be written as a product of elementary matrices. Use this method to find the inverse of 0 1 −1 0 1 @ 0 0 1 A : 0 3 −1 3. Let A and B be n × n matrices over a field F . Show that the 2n × 2n matrix IB IB C = can be transformed into D = −A 0 0 AB by elementary row operations (which you should specify). By considering the determinants of C and D, obtain another proof that det AB = det A det B. 4. (i) Let V be a non-trivial real vector space of finite dimension. Show that there are no endomorphisms α; β of V with αβ − βα = idV . (ii) Let V be the space of infinitely differentiable functions R ! R. Find endomorphisms α; β of V which do satisfy αβ − βα = idV . 5. Find the eigenvalues and give bases for the eigenspaces of the following complex matrices: 0 1 1 0 1 0 1 1 −1 1 0 1 1 −1 1 @ 0 3 −2 A ; @ 0 3 −2 A ; @ −1 3 −1 A : 0 1 0 0 1 0 −1 1 1 The second and third matrices commute; find a basis with respect to which they are both diagonal.
    [Show full text]
  • Linear Algebra Review James Chuang
    Linear algebra review James Chuang December 15, 2016 Contents 2.1 vector-vector products ............................................... 1 2.2 matrix-vector products ............................................... 2 2.3 matrix-matrix products ............................................... 4 3.2 the transpose .................................................... 5 3.3 symmetric matrices ................................................. 5 3.4 the trace ....................................................... 6 3.5 norms ........................................................ 6 3.6 linear independence and rank ............................................ 7 3.7 the inverse ...................................................... 7 3.8 orthogonal matrices ................................................. 8 3.9 range and nullspace of a matrix ........................................... 8 3.10 the determinant ................................................... 9 3.11 quadratic forms and positive semidefinite matrices ................................ 10 3.12 eigenvalues and eigenvectors ........................................... 11 3.13 eigenvalues and eigenvectors of symmetric matrices ............................... 12 4.1 the gradient ..................................................... 13 4.2 the Hessian ..................................................... 14 4.3 gradients and hessians of linear and quadratic functions ............................. 15 4.5 gradients of the determinant ............................................ 16 4.6 eigenvalues
    [Show full text]
  • A New Algorithm to Obtain the Adjugate Matrix Using CUBLAS on GPU González, H.E., Carmona, L., J.J
    ISSN: 2277-3754 ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 7, Issue 4, October 2017 A New Algorithm to Obtain the Adjugate Matrix using CUBLAS on GPU González, H.E., Carmona, L., J.J. Information Technology Department, ININ-ITTLA Information Technology Department, ININ proved to be the best option for most practical applications. Abstract— In this paper a parallel code for obtain the Adjugate The new transformation proposed here can be obtained from Matrix with real coefficients are used. We postulate a new linear it. Next, we briefly review this topic. transformation in matrix product form and we apply this linear transformation to an augmented matrix (A|I) by means of both a minimum and a complete pivoting strategies, then we obtain the II. LU-MATRICIAL DECOMPOSITION WITH GT. Adjugate matrix. Furthermore, if we apply this new linear NOTATION AND DEFINITIONS transformation and the above pivot strategy to a augmented The problem of solving a linear system of equations matrix (A|b), we obtain a Cramer’s solution of the linear system of Ax b is central to the field of matrix computation. There are equations. That new algorithm present an O n3 computational several ways to perform the elimination process necessary for complexity when n . We use subroutines of CUBLAS 2nd A, b R its matrix triangulation. We will focus on the Doolittle-Gauss rd and 3 levels in double precision and we obtain correct numeric elimination method: the algorithm of choice when A is square, results. dense, and un-structured. nxn Index Terms—Adjoint matrix, Adjugate matrix, Cramer’s Let us assume that AR is nonsingular and that we rule, CUBLAS, GPU.
    [Show full text]
  • Field of U-Invariants of Adjoint Representation of the Group GL (N, K)
    Field of U-invariants of adjoint representation of the group GL(n,K) K.A.Vyatkina A.N.Panov ∗ It is known that the field of invariants of an arbitrary unitriangular group is rational (see [1]). In this paper for adjoint representation of the group GL(n,K) we present the algebraically system of generators of the field of U-invariants. Note that the algorithm for calculating generators of the field of invariants of an arbitrary rational representation of an unipotent group was presented in [2, Chapter 1]. The invariants was constructed using induction on the length of Jordan-H¨older series. In our case the length is equal to n2; that is why it is difficult to apply the algorithm. −1 Let us consider the adjoint representation AdgA = gAg of the group GL(n,K), where K is a field of zero characteristic, on the algebra of matri- ces M = Mat(n,K). The adjoint representation determines the representation −1 ρg on K[M] (resp. K(M)) by formula ρgf(A)= f(g Ag). Let U be the subgroup of upper triangular matrices in GL(n,K) with units on the diagonal. A polynomial (rational function) f on M is called an U- invariant, if ρuf = f for every u ∈ U. The set of U-invariant rational functions K(M)U is a subfield of K(M). Let {xi,j} be a system of standard coordinate functions on M. Construct a X X∗ ∗ X X∗ X∗ X matrix = (xij). Let = (xij) be its adjugate matrix, · = · = det X · E. Denote by Jk the left lower corner minor of order k of the matrix X.
    [Show full text]
  • Formalizing the Matrix Inversion Based on the Adjugate Matrix in HOL4 Liming Li, Zhiping Shi, Yong Guan, Jie Zhang, Hongxing Wei
    Formalizing the Matrix Inversion Based on the Adjugate Matrix in HOL4 Liming Li, Zhiping Shi, Yong Guan, Jie Zhang, Hongxing Wei To cite this version: Liming Li, Zhiping Shi, Yong Guan, Jie Zhang, Hongxing Wei. Formalizing the Matrix Inversion Based on the Adjugate Matrix in HOL4. 8th International Conference on Intelligent Information Processing (IIP), Oct 2014, Hangzhou, China. pp.178-186, 10.1007/978-3-662-44980-6_20. hal-01383331 HAL Id: hal-01383331 https://hal.inria.fr/hal-01383331 Submitted on 18 Oct 2016 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License Formalizing the Matrix Inversion Based on the Adjugate Matrix in HOL4 Liming LI1, Zhiping SHI1?, Yong GUAN1, Jie ZHANG2, and Hongxing WEI3 1 Beijing Key Laboratory of Electronic System Reliability Technology, Capital Normal University, Beijing 100048, China [email protected], [email protected] 2 College of Information Science & Technology, Beijing University of Chemical Technology, Beijing 100029, China 3 School of Mechanical Engineering and Automation, Beihang University, Beijing 100083, China Abstract. This paper presents the formalization of the matrix inversion based on the adjugate matrix in the HOL4 system.
    [Show full text]
  • Linearized Polynomials Over Finite Fields Revisited
    Linearized polynomials over finite fields revisited∗ Baofeng Wu,† Zhuojun Liu‡ Abstract We give new characterizations of the algebra Ln(Fqn ) formed by all linearized polynomials over the finite field Fqn after briefly sur- veying some known ones. One isomorphism we construct is between ∨ L F n F F n n( q ) and the composition algebra qn ⊗Fq q . The other iso- morphism we construct is between Ln(Fqn ) and the so-called Dickson matrix algebra Dn(Fqn ). We also further study the relations between a linearized polynomial and its associated Dickson matrix, generalizing a well-known criterion of Dickson on linearized permutation polyno- mials. Adjugate polynomial of a linearized polynomial is then intro- duced, and connections between them are discussed. Both of the new characterizations can bring us more simple approaches to establish a special form of representations of linearized polynomials proposed re- cently by several authors. Structure of the subalgebra Ln(Fqm ) which are formed by all linearized polynomials over a subfield Fqm of Fqn where m|n are also described. Keywords Linearized polynomial; Composition algebra; Dickson arXiv:1211.5475v2 [math.RA] 1 Jan 2013 matrix algebra; Representation. ∗Partially supported by National Basic Research Program of China (2011CB302400). †Key Laboratory of Mathematics Mechanization, AMSS, Chinese Academy of Sciences, Beijing 100190, China. Email: [email protected] ‡Key Laboratory of Mathematics Mechanization, AMSS, Chinese Academy of Sciences, Beijing 100190, China. Email: [email protected] 1 1 Introduction n Let Fq and Fqn be the finite fields with q and q elements respectively, where q is a prime or a prime power.
    [Show full text]
  • Arxiv:2012.03523V3 [Math.NT] 16 May 2021 Favne Cetfi Optn Eerh(SR Spr Ft of Part (CM4)
    WRONSKIAN´ ALGEBRA AND BROADHURST–ROBERTS QUADRATIC RELATIONS YAJUN ZHOU To the memory of Dr. W (1986–2020) ABSTRACT. Throughalgebraicmanipulationson Wronskian´ matrices whose entries are reducible to Bessel moments, we present a new analytic proof of the quadratic relations conjectured by Broadhurst and Roberts, along with some generalizations. In the Wronskian´ framework, we reinterpret the de Rham intersection pairing through polynomial coefficients in Vanhove’s differential operators, and compute the Betti inter- section pairing via linear sum rules for on-shell and off-shell Feynman diagrams at threshold momenta. From the ideal generated by Broadhurst–Roberts quadratic relations, we derive new non-linear sum rules for on-shell Feynman diagrams, including an infinite family of determinant identities that are compatible with Deligne’s conjectures for critical values of motivic L-functions. CONTENTS 1. Introduction 1 2. W algebra 5 2.1. Wronskian´ matrices and Vanhove operators 5 2.2. Block diagonalization of on-shell Wronskian´ matrices 8 2.3. Sumrulesforon-shellandoff-shellBesselmoments 11 3. W⋆ algebra 20 3.1. Cofactors of Wronskians´ 21 3.2. Threshold behavior of Wronskian´ cofactors 24 3.3. Quadratic relations for off-shell Bessel moments 30 4. Broadhurst–Roberts quadratic relations 37 4.1. Quadratic relations for on-shell Bessel moments 37 4.2. Arithmetic applications to Feynman diagrams 43 4.3. Alternative representations of de Rham matrices 49 References 53 arXiv:2012.03523v3 [math.NT] 16 May 2021 Date: May 18, 2021. Keywords: Bessel moments, Feynman integrals, Wronskian´ matrices, Bernoulli numbers Subject Classification (AMS 2020): 11B68, 33C10, 34M35 (Primary) 81T18, 81T40 (Secondary) * This research was supported in part by the Applied Mathematics Program within the Department of Energy (DOE) Office of Advanced Scientific Computing Research (ASCR) as part of the Collaboratory on Mathematics for Mesoscopic Modeling of Materials (CM4).
    [Show full text]
  • Lecture 5: Matrix Operations: Inverse
    Lecture 5: Matrix Operations: Inverse • Inverse of a matrix • Computation of inverse using co-factor matrix • Properties of the inverse of a matrix • Inverse of special matrices • Unit Matrix • Diagonal Matrix • Orthogonal Matrix • Lower/Upper Triangular Matrices 1 Matrix Inverse • Inverse of a matrix can only be defined for square matrices. • Inverse of a square matrix exists only if the determinant of that matrix is non-zero. • Inverse matrix of 퐴 is noted as 퐴−1. • 퐴퐴−1 = 퐴−1퐴 = 퐼 • Example: 2 −1 0 1 • 퐴 = , 퐴−1 = , 1 0 −1 2 2 −1 0 1 0 1 2 −1 1 0 • 퐴퐴−1 = = 퐴−1퐴 = = 1 0 −1 2 −1 2 1 0 0 1 2 Inverse of a 3 x 3 matrix (using cofactor matrix) • Calculating the inverse of a 3 × 3 matrix is: • Compute the matrix of minors for A. • Compute the cofactor matrix by alternating + and – signs. • Compute the adjugate matrix by taking a transpose of cofactor matrix. • Divide all elements in the adjugate matrix by determinant of matrix 퐴. 1 퐴−1 = 푎푑푗(퐴) det(퐴) 3 Inverse of a 3 x 3 matrix (using cofactor matrix) 3 0 2 퐴 = 2 0 −2 0 1 1 0 −2 2 −2 2 0 1 1 0 1 0 1 2 2 2 0 2 3 2 3 0 Matrix of Minors = = −2 3 3 1 1 0 1 0 1 0 2 3 2 3 0 0 −10 0 0 −2 2 −2 2 0 2 2 2 1 −1 1 2 −2 2 Cofactor of A (퐂) = −2 3 3 .∗ −1 1 −1 = 2 3 −3 0 −10 0 1 −1 1 0 10 0 2 2 0 adj A = CT = −2 3 10 2 −3 0 2 2 0 0.2 0.2 0 1 1 A-1 = ∗ adj A = −2 3 10 = −0.2 0.3 1 |퐴| 10 2 −3 0 0.2 −0.3 0 4 Properties of Inverse of a Matrix • (A-1)-1 = A • (AB)-1 = B-1A-1 • (kA)-1 = k-1A-1 where k is a non-zero scalar.
    [Show full text]
  • Contents 2 Matrices and Systems of Linear Equations
    Business Math II (part 2) : Matrices and Systems of Linear Equations (by Evan Dummit, 2019, v. 1.00) Contents 2 Matrices and Systems of Linear Equations 1 2.1 Systems of Linear Equations . 1 2.1.1 Elimination, Matrix Formulation . 2 2.1.2 Row-Echelon Form and Reduced Row-Echelon Form . 4 2.1.3 Gaussian Elimination . 6 2.2 Matrix Operations: Addition and Multiplication . 8 2.3 Determinants and Inverses . 11 2.3.1 The Inverse of a Matrix . 11 2.3.2 The Determinant of a Matrix . 13 2.3.3 Cofactor Expansions and the Adjugate . 16 2.3.4 Matrices and Systems of Linear Equations, Revisited . 18 2 Matrices and Systems of Linear Equations In this chapter, we will discuss the problem of solving systems of linear equations, reformulate the problem using matrices, and then give the general procedure for solving such systems. We will then study basic matrix operations (addition and multiplication) and discuss the inverse of a matrix and how it relates to another quantity known as the determinant. We will then revisit systems of linear equations after reformulating them in the language of matrices. 2.1 Systems of Linear Equations • Our motivating problem is to study the solutions to a system of linear equations, such as the system x + 3x = 5 1 2 : 3x1 + x2 = −1 ◦ Recall that a linear equation is an equation of the form a1x1 + a2x2 + ··· + anxn = b, for some constants a1; : : : an; b, and variables x1; : : : ; xn. ◦ When we seek to nd the solutions to a system of linear equations, this means nding all possible values of the variables such that all equations are satised simultaneously.
    [Show full text]
  • Lecture No. 6
    Preliminaries: linear algebra State-space models System interconnections Control Theory (035188) lecture no. 6 Leonid Mirkin Faculty of Mechanical Engineering Technion | IIT Preliminaries: linear algebra State-space models System interconnections Outline Preliminaries: linear algebra State-space models System interconnections in terms of state-space realizations Preliminaries: linear algebra State-space models System interconnections Outline Preliminaries: linear algebra State-space models System interconnections in terms of state-space realizations Preliminaries: linear algebra State-space models System interconnections Linear algebra, notation and terminology A matrix A Rn×m is an n m table of real numbers, 2 × 2 3 a a a m 11 12 ··· 1 6 a21 a22 a1m 7 A = 6 . ··· . 7 = [aij ]; 4 . 5 · an an anm 1 2 ··· accompanied by their manipulation rules (addition, multiplication, etc). The number of linearly independent rows (or columns) in A is called its rank and denoted rank A. A matrix A Rn×m is said to 2 have full row (column) rank if rank A = n (rank A = m) − be square if n = m, tall if n > m, and fat if n < m − be diagonal (A = diag ai ) if it is square and aij = 0 whenever i = j − f g 6 be lower (upper) triangular if aij = 0 whenever i > j (i < j) − 0 0 be symmetric if A = A , where the transpose A = [aji ] − · The identity matrix I = diag 1 Rn×n (if the dimension is clear, just I ). n · It is a convention that ·A0 = I fforg every2 nonzero square A. Preliminaries: linear algebra State-space models System interconnections Block matrices n×m P P Let A R and let i=1 ni = n and i=1 mi = n for some ni ; mi N.
    [Show full text]
  • 1111: Linear Algebra I
    1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Michaelmas Term 2015 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Michaelmas Term 2015 1 / 10 Row expansion of the determinant Our next goal is to prove the following formula: i1 i2 in det(A) = ai1C + ai2C + ··· + ainC ; in other words, if we multiply each element of the i-th row of A by its cofactor and add results, the number we obtain is equal to det(A). Let us first handle the case i = 1. In this case, once we write the corresponding minors with signs, the formula reads 11 12 n+1 1n det(A) = a11A - a12A + ··· + (-1) a1nA : Let us examine the formula for det(A). It is a sum of terms corresponding to pick n elements representing each row and each column of A. In particular, it involves picking an element from the first row. This can be one of the elements a11; a12;:::; a1n. What remains, after we picked the element a1k , is to pick other elements; now we have to avoid the row 1 and the column k. This means that the elements we need to pick are precisely those involved in the determinant A1k , and we just need to check that the signs match. Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Michaelmas Term 2015 2 / 10 Row expansion of the determinant 1 In fact, it is quite easy to keep track of all signs. The column in the k two-row notation does not add inversions in the first row, and adds k - 1 inversions in the second row, since k appears before 1; 2;:::; k - 1.
    [Show full text]
  • Arxiv:1912.06967V1 [Math.RA] 15 Dec 2019 Values Faui Eigenvector Unit a of Ler Teacher
    MORE ON THE EIGENVECTORS-FROM-EIGENVALUES IDENTITY MALGORZATA STAWISKA Abstract. Using the notion of a higher adjugate of a matrix, we generalize the eigenvector-eigenvalue formula surveyed in [4] to arbitrary square matrices over C and their possibly multiple eigenvalues. 2010 Mathematics Subject Classification. 15A15, 15A24, 15A75 Keywords: Matrices, characteristic polynomial, eigenvalues, eigenvec- tors, adjugates. Dedication: To the memory of Witold Kleiner (1929-2018), my linear algebra teacher. 1. Introduction Very recently the following relation between eigenvectors and eigen- values of a Hermitian matrix (called “the eigenvector-eigenvalue iden- tity”) gained attention: Theorem 1.1. ([4]) If A is an n × n Hermitian matrix with eigen- values λ1(A), ..., λn(A) and i, j = 1, ..., n, then the jth component vi,j of a unit eigenvector vi associated to the eigenvalue λi(A) is related to the eigenvalues λ1(Mj), ..., λn−1(Mj) of the minor Mj of A formed by removing the jth row and column by the formula n n−1 2 |vi,j| Y (λi(A) − λk(A)) = Y(λi(A) − λk(Mj)). arXiv:1912.06967v1 [math.RA] 15 Dec 2019 k=1;k=6 i k=1 The survey paper ([4]) presents several proofs and some generaliza- tions of this identity, along with its many variants encountered in the modern literature, while also commenting on some sociology-of-science aspects of its jump in popularity. It should be pointed out that for sym- metric matrices over R this formula was established already in 1834 by Carl Gustav Jacob Jacobi as formula 30 in his paper [9] (in the process of proving that every real quadratic form has an orthogonal diagonal- ization).
    [Show full text]