Unit 6: Matrix Decomposition

Total Page:16

File Type:pdf, Size:1020Kb

Unit 6: Matrix Decomposition Unit 6: Matrix decomposition Juan Luis Melero and Eduardo Eyras October 2018 1 Contents 1 Matrix decomposition3 1.1 Definitions.............................3 2 Singular Value Decomposition6 3 Exercises 13 4 R practical 15 4.1 SVD................................ 15 2 1 Matrix decomposition 1.1 Definitions Matrix decomposition consists in transforming a matrix into a product of other matrices. Matrix diagonalization is a special case of decomposition and is also called diagonal (eigen) decomposition of a matrix. Definition: there is a diagonal decomposition of a square matrix A if we can write A = UDU −1 Where: • D is a diagonal matrix • The diagonal elements of D are the eigenvalues of A • Vector columns of U are the eigenvectors of A. For symmetric matrices there is a special decomposition: Definition: given a symmetric matrix A (i.e. AT = A), there is a unique decomposition of the form A = UDU T Where • U is an orthonormal matrix • Vector columns of U are the unit-norm orthogonal eigenvectors of A • D is a diagonal matrix formed by the eigenvalues of A This special decomposition is known as spectral decomposition. Definition: An orthonormal matrix is a square matrix whose columns and row vectors are orthogonal unit vectors (orthonormal vectors). Orthonormal matrices have the property that their transposed matrix is the inverse matrix. 3 Proposition: if a matrix Q is orthonormal, then QT = Q−1 Proof: consider the row vectors in a matrix Q: 0 1 u1 B . C T u j ::: ju Q = @ . A and Q = 1 n un 0 1 0 1 0 1 u1 hu1; u1i ::: hu1; uni 1 ::: 0 T B . C u j ::: ju B . .. C B. .. .C QQ = @ . A 1 n = @ . A = @. .A un hun; u1i ::: hun; uni 0 ::: 1 Remember that: Orthogonal vectors hui; uji = 0; 8i 6= j Unit vectors hui; uii = 1; 8i In addition, the determinant of Q is ±1. Theorem: if Q is an orthonormal matrix ! det(Q) = ±1. Proof: p 2 T T det(Q) = det(Q)det(Q ) = det(QQ ) = det(In) = 1 ! det(Q) = 1 = ±1 Proposition: The scalar product of two vectors is invariant under the trans- formation by a an orthonormal matrix: hQu; Qvi = hu; vi Proof: hQu; Qvi = (Qu)T Qv = uT QT Qv = uT v = hu; vi Corollary: the column (or row) vectors from an orthonormal matrix form an (orthonormal) basis of Rn 2 1 Example: Perform the spectral decomposition of the matrix A = . 1 2 4 We calculate the eigenvalues and the eigenvectors: 2 − λ 1 det(A − λI ) = det = λ2 − 4λ + 3 2 1 2 − λ 2 det(A − λI2) = 0 ! λ − 4λ + 3 = (λ − 1)(λ − 3) = 0 ! λ = 1; 3 2 1 x x 2x + y = 3x x = 3 ! ! x = y ! Eigenvectors of 3 1 2 y y x + 2y = 3y x 2 1 x x 2x + y = x x = 1 ! ! −x = y ! Eigenvectors of 1 1 2 y y x + 2y = y −x We have the following eigenspaces: a E(3) = Ker(A − 3I ) = ; a 2 ⊂ 2 2 a R R b E(1) = Ker(A − I ) = ; b 2 ⊂ 2 2 −b R R We have to choose two orthogonal unit vectors. The eigenvectors are already orthogonal to each other: b a a = ab − ba = 0 −b We normalize both vectors to 1: a 1 a a = 1 ! a = p a 2 b 1 b −b = 1 ! b = p −b 2 p p 1= 2 1= 2 So the basis B = p ; p is an orthonormal basis of 2 1= 2 −1= 2 R With these orthonormal vectors we build the orthonormal matrix that diag- onalize A: p p p p 1= 2 1= 2 1= 2 −1= 2 U = p p U −1 = U T = p p −1= 2 1= 2 1= 2 1= 2 5 The matrix U provides a unique diagonal spectral decomposition: p p p p 1= 2 1= 2 1 0 1= 2 −1= 2 A = UDU T = p p p p −1= 2 1= 2 0 3 1= 2 1= 2 Notice that the order of the eigenvectors in the orthonormal matrix deter- mines the order of the eigenvalues in the diagonal matrix. If the matrix A is non-singular (det(A) 6= 0) A 2 Mn×n(R), we can define the inverse of A using the spectral decomposition A = UDU T as: A−1 = (UDU T )−1 = (U T )−1D−1U −1 = UD−1U T where we have used that U is an orthonormal matrix (built with the eigen- values of A) for which the inverse is the transpose. Here D is the diagonal matrix with th eigenvalues of A, hence D−1 is a diagonal matrix containing the inverse of the eigenvalues. We confirm that this is the inverse of A: −1 T −1 T −1 T T AA = UDU UD U = UDD U = UU = In Example: consider the same matrix as before p p p p 1= 2 1= 2 1 0 1= 2 −1= 2 A = UDU T = p p p p −1= 2 1= 2 0 3 1= 2 1= 2 p p p p 1= 2 1= 2 1 0 1= 2 −1= 2 A−1 = p p p p −1= 2 1= 2 0 1=3 1= 2 1= 2 −1 You can easily check that AA = I2. 2 Singular Value Decomposition Singular Value Decomposition (SVD) is a form of dimensional reduction. SVD allows to identify the dimensions that are most relevant. Once these dimensions are identified, we can find the best approximation to the original data using fewer dimensions. SVD generalizes the symmetrical orthonormal decomposition to non-symmetric matrices and to rectangular (non-square) matrices. 6 A is the input matrix of dimensions m × n, U is an orthonormal matrix of dimensions m × m, Σ contains a diagonal submatrix of size min(m; n) and the rest of the elements are 0, V is an orthonormal matrix n × n. Definition of SVD: Given A a rectangular matrix A 2 Mm×n(R), we can find a decomposition: A = UΣV T Where: • U and V are orthonormal matrices T • The columns of U are orthonormal eigenvectors of AA 2 Mm×m(R). It is the orthonormal matrix that diagonalizes AAT . These are called the left singular vectors of A T • The columns of V are orthonormal eigenvectors of A A 2 Mn×n(R). It is the orthonormal matrix that diagonalizes AT A. These are called the right singular vectors of A • Σ is a rectangular block-diagonal matrix containing the square-roots of the eigenvalues of AT A (which are the same as AAT ). These are called the singular values Let's try to understand where does A = UΣV T come from and how to do the decomposition. The idea is to build symmetric matrices because they have the property that the eigenvectors matrix is orthonormal. To build symmetric matrices we multiply the matrix by its transposed: T T AA 2 Mm×m(R) A A 2 Mn×n(R) 7 These matrices are square and symmetric: (AAT )T = (AT )T AT = AAT (AT A)T = AT (AT )T = AT A AT A is a square symmetric matrix, so it has a set orthonormal eigenvectors. V is the matrix built from these eigenvectors that diagonalizes AT A: AT A = (UΣV T )T UΣV T = V ΣT U T UΣV T = V ΣT ΣV T = V Σ2V T So Σ contains the square root of the eigenvalues of AT A: (AT A)V = V Σ2 Similar for U: AAT is a square symmetric matrix, so it has also a set of orthogonal eigen- vectors. AAT = UΣV T (UΣV T )T = UΣV T V ΣT U T = UΣ2U T (AAT )U = UΣ2 U is the matrix that diagonalizes AAT and Σ contains the square root of the eigenvalues of AAT . AAT and AT A have non-negative eigenvalues (Σ matrix contains squared numbers) and they coincide: Proposition: AT A and AAT share min(m; n) eigenvalues. 8 Proof: consider v an eigenvector of AT A: AT A = V Σ2V T (AT A)v = λv ! A(AT A)v = λAv ! (AAT )Av = λAv So, if v is an eigenvalue of AT A (in V ) with eigenvalue λ, then Av is an eigenvector of AAT with eigenvalue λ. v is a column vector of V , hence hv; vi = 1. However, for Av: hAv; Avi = (Av)T Av = vT (AT A)v = vT λv = λ hv; vi = λ The eigenvectors of AAT in U corresponding to the same eigenvalues can thus be built as: 1 u = p Av λ This definition ensures that hu; ui = hAv; Avi = 1. In addition, it establishes a relationship between the eigenvectors. As the spectral decomposition, we can use SVD to define an inverse matrix. Given a non-singular non-symmetrical matrix A (det(A) 6= 0) A 2 Mn×n(R), we can write: A = UDV T where U and V are the matrix built as before, where: • U is the orthonormal matrix that diagonalizes AAT • V is the orthonormal matrix that diagonalizes AT A • D−1 is a diagonal matrix containing the reciprocal of the eigenvalues 1 ( λ ) of A 9 We can define the inverse of a matrix with: A−1 = VD−1U T −1 T −1 T −1 T T AA = UDV VD U = UDD U = UU = In 4 4 Example of SVD: calculate SVD for the matrix (A = UΣV T −3 3 We calculate V , the orthonormal matrix that diagonalizes AT A 4 −3 4 4 25 7 AT A = = 4 3 −3 3 7 25 We can see numerically here that AT A is symmetric.
Recommended publications
  • Geometric Polarimetry − Part I: Spinors and Wave States
    1 Geometric Polarimetry Part I: Spinors and − Wave States David Bebbington, Laura Carrea, and Ernst Krogager, Member, IEEE Abstract A new approach to polarization algebra is introduced. It exploits the geometric properties of spinors in order to represent wave states consistently in arbitrary directions in three dimensional space. In this first expository paper of an intended series the basic derivation of the spinorial wave state is seen to be geometrically related to the electromagnetic field tensor in the spatio-temporal Fourier domain. Extracting the polarization state from the electromagnetic field requires the introduction of a new element, which enters linearly into the defining relation. We call this element the phase flag and it is this that keeps track of the polarization reference when the coordinate system is changed and provides a phase origin for both wave components. In this way we are able to identify the sphere of three dimensional unit wave vectors with the Poincar´esphere. Index Terms state of polarization, geometry, covariant and contravariant spinors and tensors, bivectors, phase flag, Poincar´esphere. I. INTRODUCTION arXiv:0804.0745v1 [physics.optics] 4 Apr 2008 The development of applications in radar polarimetry has been vigorous over the past decade, and is anticipated to continue with ambitious new spaceborne remote sensing missions (for example TerraSAR-X [1] and TanDEM-X [2]). As technical capabilities increase, and new application areas open up, innovations in data analysis often result. Because polarization data are This work was supported by the Marie Curie Research Training Network AMPER (Contract number HPRN-CT-2002-00205). D. Bebbington and L.
    [Show full text]
  • A Fast Method for Computing the Inverse of Symmetric Block Arrowhead Matrices
    Appl. Math. Inf. Sci. 9, No. 2L, 319-324 (2015) 319 Applied Mathematics & Information Sciences An International Journal http://dx.doi.org/10.12785/amis/092L06 A Fast Method for Computing the Inverse of Symmetric Block Arrowhead Matrices Waldemar Hołubowski1, Dariusz Kurzyk1,∗ and Tomasz Trawi´nski2 1 Institute of Mathematics, Silesian University of Technology, Kaszubska 23, Gliwice 44–100, Poland 2 Mechatronics Division, Silesian University of Technology, Akademicka 10a, Gliwice 44–100, Poland Received: 6 Jul. 2014, Revised: 7 Oct. 2014, Accepted: 8 Oct. 2014 Published online: 1 Apr. 2015 Abstract: We propose an effective method to find the inverse of symmetric block arrowhead matrices which often appear in areas of applied science and engineering such as head-positioning systems of hard disk drives or kinematic chains of industrial robots. Block arrowhead matrices can be considered as generalisation of arrowhead matrices occurring in physical problems and engineering. The proposed method is based on LDLT decomposition and we show that the inversion of the large block arrowhead matrices can be more effective when one uses our method. Numerical results are presented in the examples. Keywords: matrix inversion, block arrowhead matrices, LDLT decomposition, mechatronic systems 1 Introduction thermal and many others. Considered subsystems are highly differentiated, hence formulation of uniform and simple mathematical model describing their static and A square matrix which has entries equal zero except for dynamic states becomes problematic. The process of its main diagonal, a one row and a column, is called the preparing a proper mathematical model is often based on arrowhead matrix. Wide area of applications causes that the formulation of the equations associated with this type of matrices is popular subject of research related Lagrangian formalism [9], which is a convenient way to with mathematics, physics or engineering, such as describe the equations of mechanical, electromechanical computing spectral decomposition [1], solving inverse and other components.
    [Show full text]
  • Structured Factorizations in Scalar Product Spaces
    STRUCTURED FACTORIZATIONS IN SCALAR PRODUCT SPACES D. STEVEN MACKEY¤, NILOUFER MACKEYy , AND FRANC»OISE TISSEURz Abstract. Let A belong to an automorphism group, Lie algebra or Jordan algebra of a scalar product. When A is factored, to what extent do the factors inherit structure from A? We answer this question for the principal matrix square root, the matrix sign decomposition, and the polar decomposition. For general A, we give a simple derivation and characterization of a particular generalized polar decomposition, and we relate it to other such decompositions in the literature. Finally, we study eigendecompositions and structured singular value decompositions, considering in particular the structure in eigenvalues, eigenvectors and singular values that persists across a wide range of scalar products. A key feature of our analysis is the identi¯cation of two particular classes of scalar products, termed unitary and orthosymmetric, which serve to unify assumptions for the existence of structured factorizations. A variety of di®erent characterizations of these scalar product classes is given. Key words. automorphism group, Lie group, Lie algebra, Jordan algebra, bilinear form, sesquilinear form, scalar product, inde¯nite inner product, orthosymmetric, adjoint, factorization, symplectic, Hamiltonian, pseudo-orthogonal, polar decomposition, matrix sign function, matrix square root, generalized polar decomposition, eigenvalues, eigenvectors, singular values, structure preservation. AMS subject classi¯cations. 15A18, 15A21, 15A23, 15A57,
    [Show full text]
  • Linear Algebra - Part II Projection, Eigendecomposition, SVD
    Linear Algebra - Part II Projection, Eigendecomposition, SVD (Adapted from Punit Shah's slides) 2019 Linear Algebra, Part II 2019 1 / 22 Brief Review from Part 1 Matrix Multiplication is a linear tranformation. Symmetric Matrix: A = AT Orthogonal Matrix: AT A = AAT = I and A−1 = AT L2 Norm: s X 2 jjxjj2 = xi i Linear Algebra, Part II 2019 2 / 22 Angle Between Vectors Dot product of two vectors can be written in terms of their L2 norms and the angle θ between them. T a b = jjajj2jjbjj2 cos(θ) Linear Algebra, Part II 2019 3 / 22 Cosine Similarity Cosine between two vectors is a measure of their similarity: a · b cos(θ) = jjajj jjbjj Orthogonal Vectors: Two vectors a and b are orthogonal to each other if a · b = 0. Linear Algebra, Part II 2019 4 / 22 Vector Projection ^ b Given two vectors a and b, let b = jjbjj be the unit vector in the direction of b. ^ Then a1 = a1 · b is the orthogonal projection of a onto a straight line parallel to b, where b a = jjajj cos(θ) = a · b^ = a · 1 jjbjj Image taken from wikipedia. Linear Algebra, Part II 2019 5 / 22 Diagonal Matrix Diagonal matrix has mostly zeros with non-zero entries only in the diagonal, e.g. identity matrix. A square diagonal matrix with diagonal elements given by entries of vector v is denoted: diag(v) Multiplying vector x by a diagonal matrix is efficient: diag(v)x = v x is the entrywise product. Inverting a square diagonal matrix is efficient: 1 1 diag(v)−1 = diag [ ;:::; ]T v1 vn Linear Algebra, Part II 2019 6 / 22 Determinant Determinant of a square matrix is a mapping to a scalar.
    [Show full text]
  • LU Decomposition - Wikipedia, the Free Encyclopedia
    LU decomposition - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/LU_decomposition From Wikipedia, the free encyclopedia In linear algebra, LU decomposition (also called LU factorization) is a matrix decomposition which writes a matrix as the product of a lower triangular matrix and an upper triangular matrix. The product sometimes includes a permutation matrix as well. This decomposition is used in numerical analysis to solve systems of linear equations or calculate the determinant of a matrix. LU decomposition can be viewed as a matrix form of Gaussian elimination. LU decomposition was introduced by mathematician Alan Turing [1] 1 Definitions 2 Existence and uniqueness 3 Positive definite matrices 4 Explicit formulation 5 Algorithms 5.1 Doolittle algorithm 5.2 Crout and LUP algorithms 5.3 Theoretical complexity 6 Small example 7 Sparse matrix decomposition 8 Applications 8.1 Solving linear equations 8.2 Inverse matrix 8.3 Determinant 9 See also 10 References 11 External links Let A be a square matrix. An LU decomposition is a decomposition of the form where L and U are lower and upper triangular matrices (of the same size), respectively. This means that L has only zeros above the diagonal and U has only zeros below the diagonal. For a matrix, this becomes: An LDU decomposition is a decomposition of the form where D is a diagonal matrix and L and U are unit triangular matrices, meaning that all the entries on the diagonals of L and U LDU decomposition of a Walsh matrix 1 of 7 1/11/2012 5:26 PM LU decomposition - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/LU_decomposition are one.
    [Show full text]
  • Arxiv:1105.1185V1 [Math.NA] 5 May 2011 Ento 2.2
    ITERATIVE METHODS FOR COMPUTING EIGENVALUES AND EIGENVECTORS MAYSUM PANJU Abstract. We examine some numerical iterative methods for computing the eigenvalues and eigenvectors of real matrices. The five methods examined here range from the simple power iteration method to the more complicated QR iteration method. The derivations, procedure, and advantages of each method are briefly discussed. 1. Introduction Eigenvalues and eigenvectors play an important part in the applications of linear algebra. The naive method of finding the eigenvalues of a matrix involves finding the roots of the characteristic polynomial of the matrix. In industrial sized matrices, however, this method is not feasible, and the eigenvalues must be obtained by other means. Fortunately, there exist several other techniques for finding eigenvalues and eigenvectors of a matrix, some of which fall under the realm of iterative methods. These methods work by repeatedly refining approximations to the eigenvectors or eigenvalues, and can be terminated whenever the approximations reach a suitable degree of accuracy. Iterative methods form the basis of much of modern day eigenvalue computation. In this paper, we outline five such iterative methods, and summarize their derivations, procedures, and advantages. The methods to be examined are the power iteration method, the shifted inverse iteration method, the Rayleigh quotient method, the simultaneous iteration method, and the QR method. This paper is meant to be a survey over existing algorithms for the eigenvalue computation problem. Section 2 of this paper provides a brief review of some of the linear algebra background required to understand the concepts that are discussed. In section 3, the iterative methods are each presented, in order of complexity, and are studied in brief detail.
    [Show full text]
  • Householder Matrix H( W )= E ( W , W ,2) = I − 2 Wwh for Wh W =1
    Outline Elementary Matrix Full-rank Decomposition Triangular Matrix Decomposition QR Decomposition Schur Theorem and Normal Matrix 1 Elementary Matrix Elementary Matrix E(,, u vσσ )= I − uvH Identity matrix plus a rank-one matrix Properties on the Elementary Matrix Determinant Euv(,,σσ )= 1 − vH u σ inverse matrix Euv(,,σ )−1 = Euv (,, ) σ vuH −1 for any two nonzero vectors a and b, their exists an elementary matrix such that Euv(,,σ ) a= b 2 Elementary Matrix Determinant Euv(,,σσ )= 1 − vH u uH uuHH u H E(,, u v σσ )=−=−uvHH u σ v , u uu u H uuHH −=−uσσ v1, vu uu uH E(,,) u vσ = u HH if u u = 0. 0 00 σ Inverse Matrix Euv(,,σ )−1 = Euv (,, ) σ vuH −1 brute-force proof For any two nonzero vectors a and b, their exists an elementary matrix such that E(u,v,σ )a = b 3 Elementary Matrix For any two nonzero vectors a and b, their exists an elementary matrix such that Euv(,,σ ) a= b E(,, u vσσ ) a=−= a uvH a b ⇒=−σuvH a a b ⇒=−u a b,1σ vaH = 4 Elementary Matrix Householder Matrix H( w )= E ( w , w ,2) = I − 2 wwH for wH w =1 Properties on the Householder Matrix determinant det(Hw ( ))=−=− 1 2 wwH 1 inverse Hw()−1 = Hw ()H = Hw () 5 Full-Rank Decomposition Full-rank Decomposition Theorem: For m*n matrix A and det(A) = r, there exists m*r full- rank matrix B and r*n full-rank matrix C, such that A = BC.
    [Show full text]
  • Electronic Reprint Wedge Reversion Antisymmetry and 41 Types of Physical Quantities in Arbitrary Dimensions Iucr Journals
    electronic reprint ISSN: 2053-2733 journals.iucr.org/a Wedge reversion antisymmetry and 41 types of physical quantities in arbitrary dimensions Venkatraman Gopalan Acta Cryst. (2020). A76, 318–327 IUCr Journals CRYSTALLOGRAPHY JOURNALS ONLINE Copyright c International Union of Crystallography Author(s) of this article may load this reprint on their own web site or institutional repository provided that this cover page is retained. Republication of this article or its storage in electronic databases other than as specified above is not permitted without prior permission in writing from the IUCr. For further information see https://journals.iucr.org/services/authorrights.html Acta Cryst. (2020). A76, 318–327 Venkatraman Gopalan · Wedge reversion antisymmetry research papers Wedge reversion antisymmetry and 41 types of physical quantities in arbitrary dimensions ISSN 2053-2733 Venkatraman Gopalan* Department of Materials Science and Engineering, Department of Physics, and Department of Engineering Science and Mechanics, Pennsylvania State University, University Park, PA 16802, USA. *Correspondence e-mail: [email protected] Received 18 October 2019 Accepted 16 February 2020 It is shown that there are 41 types of multivectors representing physical quantities in non-relativistic physics in arbitrary dimensions within the formalism of Clifford algebra. The classification is based on the action of three Edited by S. J. L. Billinge, Columbia University, symmetry operations on a general multivector: spatial inversion, 1, time- USA reversal, 10, and a third that is introduced here, namely wedge reversion, 1†.Itis shown that the traits of ‘axiality’ and ‘chirality’ are not good bases for extending Keywords: multivectors; wedge reversion antisymmetry; Clifford algebra. the classification of multivectors into arbitrary dimensions, and that introducing 1† would allow for such a classification.
    [Show full text]
  • Matrix Decompositions
    Matrix Decompositions Paul Johnson December 2012 1 Background In order to understand these notes, you should have some experience with matrix algebra. Perhaps not an en- tire semester or year of matrix algebra is necessary, but comfort with columns, rows, and their multiplication, is assumed. I assume you know about \inner products" of vectors. matrix multiplication (which is actually conducted by calculating the inner products of the rows and columns of the matrices). the transpose of a vector converts a row into a column (and vice versa) the transpose of a matrix is a \reflection" of that matrix on its main diagonal. Other than that, I try to define the terms as I go. Inverse and Identity Recall that an inverse of X is matrix X−1 such that XX−1 = I (1) I , the \identity matrix", is a matrix of 1's and 0's, 2 1 0 0 0 0 3 6 0 1 0 0 0 7 6 7 6 0 0 1 0 0 7 I = 6 7 (2) 6 .. 7 4 0 0 0 . 0 5 0 0 0 0 1 If you could grab the first row of X, and the first column of X−1, the inner product of row and column would be 1. And the product of that first row with any other column of X−1 will be 0. Disregard some Elementary Linear Algebra In statistics, we often need to calculate the inverse of X. We do that in order to\solve"a system or\calculate" some statistic. In elementary matrix algebra, we see a matrix A and vectors x and b, Ax = b (3) 1 solved by the introduction of an inverse matrix A−1, a matrix such that A−1A = I: A−1Ax = A−1b Ix = A−1b x = A−1b It is almost instinctual to think that, if we need to calculate x, we multiply A−1b.
    [Show full text]
  • Usage of Matrix Decomposition
    Usage of matrix decomposition Matrix decomposition is a branch of linear algebra that has taken a more and more important role each day. This is because it takes a vital place in many modern data science disciplines: large data manipulation, digital image compression and processing, noise reduction, machine learning, recommender systems, interest rates,... MatDeck has implemented several types of matrix decomposition techniques: Cholesky decomposition Cholesky LDP decomposition Hessenberg decomposition LU decomposition LU with permutation matrices QR decomposition QR decomposition with permutation matrix SVD decomposition Diagonalization We will illustrate the usage of SVD decomposition (Singular Value Decomposition) on a image compression problem. Let's try to reduce the size of the image cow.jpg 200 x 200 as much as we can while we will trying to keep picture quality at acceptable level. The goal is to find the best ratio between size reduction and image quality. Original image Read image in pic: = image read c "cow.jpg"d variable pic Convert image to a : = image2matrixc picd matrix and save it to variable a rankc ad = 199 Rank of matrix The image we have imported has a rank of 199, so it will have 199 singular values. We will take a reduced number of singular values to form a lower rank approximation matrix of the original matrix. The amount of data of the original image we are dealing with is as follows Image resolution = 200 x 200 T Matrix before Original matrix = U mat S mat V mat SVD algorithm U mat = 200 x 200 = 40000 elements S mat = 200 x 200 = 40000 elements V mat = 200 x 200 = 40000 elements It means that the total number of matrix entries needed to reconstruct the image using the SVD is 120.000.
    [Show full text]
  • Path Connectedness and Invertible Matrices
    PATH CONNECTEDNESS AND INVERTIBLE MATRICES JOSEPH BREEN 1. Path Connectedness Given a space,1 it is often of interest to know whether or not it is path-connected. Informally, a space X is path-connected if, given any two points in X, we can draw a path between the points which stays inside X. For example, a disc is path-connected, because any two points inside a disc can be connected with a straight line. The space which is the disjoint union of two discs is not path-connected, because it is impossible to draw a path from a point in one disc to a point in the other disc. Any attempt to do so would result in a path that is not entirely contained in the space: Though path-connectedness is a very geometric and visual property, math lets us formalize it and use it to gain geometric insight into spaces that we cannot visualize. In these notes, we will consider spaces of matrices, which (in general) we cannot draw as regions in R2 or R3. To begin studying these spaces, we first explicitly define the concept of a path. Definition 1.1. A path in X is a continuous function ' : [0; 1] ! X. In other words, to get a path in a space X, we take an interval and stick it inside X in a continuous way: X '(1) 0 1 '(0) 1Formally, a topological space. 1 2 JOSEPH BREEN Note that we don't actually have to use the interval [0; 1]; we could continuously map [1; 2], [0; 2], or any closed interval, and the result would be a path in X.
    [Show full text]
  • Robust Matrix Decomposition with Sparse Corruptions Daniel Hsu, Sham M
    1 Robust Matrix Decomposition with Sparse Corruptions Daniel Hsu, Sham M. Kakade, and Tong Zhang Abstract—Suppose a given observation matrix can be matrix XS of errors before being observed as decomposed as the sum of a low-rank matrix and a sparse matrix, and the goal is to recover these individual compo- Y = XS + XL: nents from the observed sum. Such additive decompositions (sparse) (low-rank) have applications in a variety of numerical problems including system identification, latent variable graphical The goal is to recover the original data matrix XL modeling, and principal components analysis. We study (and the error components XS) from the corrupted conditions under which recovering such a decomposition observations Y . In the latent variable model application is possible via a combination of `1 norm and trace norm minimization. We are specifically interested in the question of Chandrasekaran et al. [2], Y represents the precision of how many sparse corruptions are allowed so that convex matrix over visible nodes of a Gaussian graphical model, programming can still achieve accurate recovery, and we and XS represents the precision matrix over the visible obtain stronger recovery guarantees than previous studies. nodes when conditioned on the hidden nodes. In general, Moreover, we do not assume that the spatial pattern of Y may be dense as a result of dependencies between corruptions is random, which stands in contrast to related analyses under such assumptions via matrix completion. visible nodes through the hidden nodes. However, XS will be sparse when the visible nodes are mostly in- Index Terms—Matrix decompositions, sparsity, low- dependent after conditioning on the hidden nodes, and rank, outliers the difference XL = Y − XS will be low-rank when the number of hidden nodes is small.
    [Show full text]