DOC PREVIEW
UNM CS 530 - A primer on matrices

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

A primer on matricesStephen BoydAugust 25, 2002These notes describe the notation of matrices, the mechanics of matrix manipulation,and how to use matrices to formulate and solve sets of simultaneous linear equations.We won’t cover• linear algebra, i.e., the underlying mathematics of matrices• numerical linear algebra, i.e., the algorithms used to manipulate matrices and solvelinear equations• software for forming and manipulating matrices, e.g., Matlab, Mathematica, or Octave• how to represent and manipulate matrices, or solve linear equations, in computer lan-guages such as C/C++ or Java• applications, for example in statistics, mechanics, economics, circuit analysis, or graphtheory11 Matrix terminology and notationMatricesA matrix is a rectangular array of numbers (also called scalars), written between squarebrackets, as inA =01−2.30.11.34−0.104.1−101.7.An important attribute of a matrix is its size or dimensions, i.e.,thenumbersofrows andcolumns. The matrix A above, for example, has 3 rows and 4 columns, so its size is 3 × 4.(Size is always given as rows × columns.) A matrix with m rows and n columns is called anm × n matrix.An m × n matrix is called square if m = n, i.e., if it has an equal number of rows andcolumns. Some authors refer to an m × n matrix as fat if m<n(fewer rows than columns),or skinny if m>n(more rows than columns). The matrix A above is fat.The entries or coefficients of a matrix are the values in the array. The i, j entry is thevalue in the ith row and jth column, denoted by double subscripts: the i, j entry of a matrixC is denoted Cij(which is a number). The positive integers i and j are called the (row andcolumn, respectively) indices. For our example above, A13= −2.3, A32= −1. The rowindex of the bottom left entry (which has value 4.1) is 3; its column index is 1.Two matrices are equal if they are the same size and all the corresponding entries (whichare numbers) are equal.Vectors and scalarsAmatrixwithonlyonecolumn,i.e., with size n × 1, is called a column vector or just avector. Sometimes the size is specified by calling it an n-vector. The entries of a vector aredenoted with just one subscript (since the other is 1), as in a3. The entries are sometimescalled the components of the vector, and the number of rows of a vector is sometimes calledits dimension.Asanexample,v=1−23.30.3is a 4-vector (or 4 × 1 matrix, or vector of dimension 4); its third component is v3=3.3.Similarly, a matrix with only one row, i.e., with size 1 × n, is called a row vector.Asanexample,w =h−2.1 −30iis a row vector (or 1 × 3 matrix); its third component is w3=0.Sometimes a 1 × 1 matrix is considered to be the same as an ordinary number. In thecontext of matrices and scalars, ordinary numbers are often called scalars.2Notational conventions for matrices, vectors, and scalarsSome authors try to use notation that helps the reader distinguish between matrices, vectors,and scalars (numbers). For example, Greek letters (α, β, ...) might be used for numbers,lower-case letters (a, x, f , ...) for vectors, and capital letters (A, F, ...) for matrices.Other notational conventions include matrices given in bold font (G), or vectors writtenwith arrows above them (~a).Unfortunately, there are about as many notational conventions as authors, so you shouldbe prepared to figure out what things are (i.e., scalars, vectors, matrices) despite the author’snotational scheme (if any exists).Zero and identity matricesThe zero matrix (of size m × n) is the matrix with all entries equal to zero. Sometimesthe zero matrix is written as 0m×n, where the subscript denotes the size. But often, a zeromatrix is denoted just 0, the same symbol used to denote the number 0. In this case you’llhave to figure out the size of the zero matrix from the context. (More on this later.) Whena zero matrix is a (row or column) vector, we call it a zero (row or column) vector.Note that zero matrices of different sizes are different matrices, even though we use thesame symbol to denote them (i.e., 0). In programming we call this overloading:wesaythesymbol 0 is overloaded because it can mean different things depending on its context (i.e.,the equation it appears in).An identity matrix is another common matrix. It is always square, i.e., has the samenumber of rows as columns. Its diagonal entries, i.e., those with equal row and column index,are all equal to one, and its off-diagonal entries (those with unequal row and column indices)are zero. Identity matrices are denoted by the letter I. Sometimes a subscript denotes thesize, as in I4or I2×2. But more often the size must be determined from context (just likezero matrices). Formally, the identity matrix of size n is defined byIij=(1 i = j0 i 6= jPerhaps more illuminating are the examples"1001#,1000010000100001which are the 2 × 2and4×4 identity matrices. (Remember that both are denoted with thesame symbol, namely, I.) The importance of the identity matrix will become clear later.Unit and ones vectorsA vector with one component one and all others zero is called a unit vector.Theith unitvector, whose ith component is 1 and all others are zero, is usually denoted ei. As with zero3or identity matrices, you usually have the figure out the dimension of a unit vector fromcontext. The three unit 3-vectors are:e1=100,e2=010,e3=001.Note that the n columns of the n × n identity matrix are the n unit n-vectors. Another termfor eiis ith standard basis vector. Also, you should watch out, because some authors use theterm ‘unit vector’ to mean a vector of length one. (We’ll explain that later.)Another common vector is the one with all components one, sometimes called the onesvector, and denoted 1 (by some authors) or e (by others). For example, the 4-dimensionalones vector is1 =1111.42 Matrix operationsMatrices can be combined using various operations to form other matrices.Matrix transposeIf A is an m × n matrix, its transpose, denoted AT(or sometimes A0), is the n × m matrixgiven byATij= Aji. In words, the rows and columns of A are transposed in AT.Forexample,047031T="073401#.Transposition converts row vectors into column vectors, and vice versa. If we transpose amatrix twice, we get back the original matrix:ATT= A.Matrix additionTwo matrices of


View Full Document

UNM CS 530 - A primer on matrices

Download A primer on matrices
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A primer on matrices and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A primer on matrices 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?