sum of squared error.

Similar documents
Definition of Equality of Matrices. Example 1: Equality of Matrices. Consider the four matrices

ENGR-1100 Introduction to Engineering Analysis. Lecture 21. Lecture outline

ENGR-1100 Introduction to Engineering Analysis. Lecture 21

Linear Algebra and Vector Analysis MATH 1120

9 Appendix. Determinants and Cramer s formula

MATRIX DETERMINANTS. 1 Reminder Definition and components of a matrix

Determinant of a Matrix

Determinants of 2 2 Matrices

MATH 2050 Assignment 8 Fall [10] 1. Find the determinant by reducing to triangular form for the following matrices.

22m:033 Notes: 3.1 Introduction to Determinants

Cofactors and Laplace s expansion theorem

MAC Module 3 Determinants. Learning Objectives. Upon completing this module, you should be able to:

The Laplace Expansion Theorem: Computing the Determinants and Inverses of Matrices

Lecture 2 Systems of Linear Equations and Matrices, Continued

Differential Equations and Linear Algebra C. Henry Edwards David E. Penney Third Edition

6.4 Determinants and Cramer s Rule

Evaluating Determinants by Row Reduction

Lesson 3. Inverse of Matrices by Determinants and Gauss-Jordan Method

Algebra & Trig. I. For example, the system. x y 2 z. may be represented by the augmented matrix

William Stallings Copyright 2010

Methods for Solving Linear Systems Part 2

Determinant: 3.2 Evaluation of Determinant with Elementary

Chapter 2. Square matrices

MATH 2030: EIGENVALUES AND EIGENVECTORS

Determinants. Samy Tindel. Purdue University. Differential equations and linear algebra - MA 262

Chapter 3. Determinants and Eigenvalues

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Chapter 4. Determinants

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATRICES AND MATRIX OPERATIONS

1300 Linear Algebra and Vector Geometry

Math Lecture 27 : Calculating Determinants

Some Notes on Linear Algebra

Formula for the inverse matrix. Cramer s rule. Review: 3 3 determinants can be computed expanding by any row or column

Lecture 8: Determinants I

Math 240 Calculus III

LINEAR ALGEBRA REVIEW

Introduction to Determinants

Ron Paul Curriculum 9th Grade Mathematics Problem Set #2

Digital Workbook for GRA 6035 Mathematics

Physics 116A Determinants

2 b 3 b 4. c c 2 c 3 c 4

7.3. Determinants. Introduction. Prerequisites. Learning Outcomes

Announcements Wednesday, October 25

Graduate Mathematical Economics Lecture 1

Linear Systems and Matrices

Components and change of basis

Advanced Engineering Mathematics Prof. Pratima Panigrahi Department of Mathematics Indian Institute of Technology, Kharagpur

Lecture 3i Complex Systems of Equations (pages )

1111: Linear Algebra I

Section 5.3 Systems of Linear Equations: Determinants

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

ECON 186 Class Notes: Linear Algebra

Determinants. 2.1 Determinants by Cofactor Expansion. Recall from Theorem that the 2 2 matrix

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

MATH 213 Linear Algebra and ODEs Spring 2015 Study Sheet for Midterm Exam. Topics

MAT 1332: CALCULUS FOR LIFE SCIENCES. Contents. 1. Review: Linear Algebra II Vectors and matrices Definition. 1.2.

Inverses and Determinants

REVIEW FOR EXAM II. The exam covers sections , the part of 3.7 on Markov chains, and

Lemma 8: Suppose the N by N matrix A has the following block upper triangular form:

Conceptual Questions for Review

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Undergraduate Mathematical Economics Lecture 1

Lecture 2e Row Echelon Form (pages 73-74)

Lectures on Linear Algebra for IT

Question: Given an n x n matrix A, how do we find its eigenvalues? Idea: Suppose c is an eigenvalue of A, then what is the determinant of A-cI?

Diagonalization. MATH 1502 Calculus II Notes. November 4, 2008

Determinants: Elementary Row/Column Operations

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

MATRICES. knowledge on matrices Knowledge on matrix operations. Matrix as a tool of solving linear equations with two or three unknowns.

Math 416, Spring 2010 The algebra of determinants March 16, 2010 THE ALGEBRA OF DETERMINANTS. 1. Determinants

7.6 The Inverse of a Square Matrix

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

This MUST hold matrix multiplication satisfies the distributive property.

MATH10212 Linear Algebra B Homework 7

Matrices. In this chapter: matrices, determinants. inverse matrix

4. Determinants.

a 11 a 12 a 11 a 12 a 13 a 21 a 22 a 23 . a 31 a 32 a 33 a 12 a 21 a 23 a 31 a = = = = 12

APPENDIX: MATHEMATICAL INDUCTION AND OTHER FORMS OF PROOF

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Lecture 10: Determinants and Cramer s Rule

A = , A 32 = n ( 1) i +j a i j det(a i j). (1) j=1

Determinants Chapter 3 of Lay

18.06SC Final Exam Solutions

MIDTERM 1 - SOLUTIONS

Elementary maths for GMT

MATH 1210 Assignment 4 Solutions 16R-T1

Methods of Solution of Linear Simultaneous Equations

MATHEMATICS 217: HONORS LINEAR ALGEBRA Spring Term, First Week, February 4 8

Matrices. A matrix is a method of writing a set of numbers using rows and columns. Cells in a matrix can be referenced in the form.

HOMEWORK 9 solutions

Math 103, Summer 2006 Determinants July 25, 2006 DETERMINANTS. 1. Some Motivation

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ]

Math/CS 466/666: Homework Solutions for Chapter 3

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

1 Determinants. 1.1 Determinant

Linear Algebra: Lecture Notes. Dr Rachel Quinlan School of Mathematics, Statistics and Applied Mathematics NUI Galway

Intermediate Algebra Summary - Part I

Tin Ka Ping Secondary School F.5 Mathematics Module 2 Teaching Syllabus

Transcription:

IT 131 MATHEMATCS FOR SCIENCE LECTURE NOTE 6 LEAST SQUARES REGRESSION ANALYSIS and DETERMINANT OF A MATRIX Source: Larson, Edwards, Falvo (2009): Elementary Linear Algebra, Sixth Edition You will now look at a procedure that is used in statistics to develop linear models. The next example demonstrates a visual method for approximating a line of best fit for a given set of data points. Example 9: A Visual Straight-Line Approximation Determine the straight line that best fits the points. 1 Solution Plot the points, as shown in Figure 2.2. It appears that a good choice would be the line whose slope is 1 and whose -intercept is 0.5. The equation of this line is y = 0.5 + x. One way of measuring how well a function y = f(x)fits a set of points is to compute the differences between the values from the function and the actual values, as shown in Figure 2.4. By squaring these differences and summing the results, you obtain a measure of error that is called the sum of squared error. The sums of squared errors for our two linear models are shown in Table 2.1 below.

2 The sums of squared errors confirm that the second model fits the given points better than the first. Of all possible linear models for a given set of points, the model that has the best fit is defined to be the one that minimizes the sum of squared error. This model is called the least squares regression line, and the procedure for finding it is called the method of least squares. Definition of Least Squares Regression Line To find the least squares regression line for a set of points, begin by forming the system of linear equations where the right-hand term, [y i f(x i )], of each equation is thought of as the error in the approximation y i by f(x i ) of by Then write this error as So that the system of equations takes the form

3 Now, if you define Y, X, A, and E as The n linear equations may be replaces by the matrix equation Y = XA + E. Note that the matrix X has two columns, a column of 1 s (corresponding to a 0 ) and a column containing the x i s. This matrix equation can be used to determine the coefficients of the least squares regression line, as follows. Matrix Form for Linear Regression Example 10 demonstrates the use of this procedure to find the least squares regression line for the set of points from Example 9. Example 10: Finding the Least Squares Regression Line Find the least squares regression line for the points (1,1)(2,2)(3,4)(4,4), and (5,6) (see Figure 2.5). Then find the sum of squared error for this regression line.

4 Solution Using the five points below, the matrices X and Y are This means that And Now, using (X T X) 1 to find the coefficient matrix A, you have The least squares regression line is (See Figure 2.5.) The sum of squared error for this line can be shown to be 0.8, which means that this line fits the data better than either of the two experimental linear models determined earlier.

5

6

DETERMINANTS 3.1: The Determinant of a Matrix Every square matrix can be associated with a real number called its determinant. Definition of the Determinant of a 2 x 2 Matrix 7 A convenient method for remembering the formula for the determinant of a 2 2matrix is shown in the diagram below. The determinant is the difference of the products of the two diagonals of the matrix. Note that the order is important, as demonstrated above. Example 1: The Determinant of a Matrix of Order 2 Find the determinant of a Matrix of Order 2 Solution R E M A R K : The determinant of a matrix can be positive, zero, or negative. The determinant of a matrix of order 1 is defined simply as the entry of the matrix. For instance, if A = [ 2]then det(a) = 2. To define the determinant of a matrix of order higher than 2, it is convenient to use the notions of minors and cofactors. Definitions of Minors and Cofactors of a Matrix

For example, if A is a 3 3 matrix, then the minors and cofactors of a 21 and are as shown in the diagram below. 8 As you can see, the minors and cofactors of a matrix can differ only in sign. To obtain the cofactors of a matrix, first find the minors and then apply the checkerboard pattern of + s and s shown below. Note that odd positions (where i + j is odd) have negative signs, and even positions (where i + j is even) have positive signs. Example 2: Find the Minors and Cofactors of a Matrix Find all the minors and cofactors of Solution To find the minor M 11, delete the first row and first column of A and evaluate the determinant of the resulting matrix.

Similarly, to find M 12, delete the first row and second column. 9 Continuing this pattern, you obtain Now to find the cofactors, combine the checkerboard pattern of signs with these minors to obtain Now that the minors and cofactors of a matrix have been defined, you are ready for a general definition of the determinant of a matrix. The next definition is called inductive because it uses determinants of matrices of order n 1 to define the determinant of a matrix of order n. Definition of the Determinant of a Matrix When you use this definition to evaluate a determinant, you are expanding by cofactors in the first row. This procedure is demonstrated in Example 3. Example 3: The Determinant of a Matrix of Order 3 Find the determinant of Solution This matrix is the same as the one in Example 2. There you found the cofactors of the entries in the first row to be By the definition of a determinant, you have

Although the determinant is defined as an expansion by the cofactors in the first row, it can be shown that the determinant can be evaluated by expanding by any row or column. For instance, you could expand the 3 3 matrix in Example 3 by the second row to obtain 10 Or by the first column to obtain Try other possibilities to confirm that the determinant of can be evaluated by expanding by any row or column. Theorem 3.1: Expansion by Cofactors When expanding by cofactors, you do not need to evaluate the cofactors of zero entries, because a zero entry times its cofactor is zero. The row (or column) containing the most zeros is usually the best choice for expansion by cofactors. This is demonstrated in the next example. Example 4: The Determinant of a Matrix of Order 4 Find the determinant of Solution By inspecting this matrix, you can see that three of the entries in the third column are zeros. You can eliminate some of the work in the expansion by using the third column. Because C 23, C 33, and C 43 have zero coefficients, you need only find the cofactor C 13 To do this, delete the first row and third column of A and evaluate the determinant of the resulting matrix.

11 Expanding by cofactors in the second row yields There is an alternative method commonly used for evaluating the determinant of a 3 x 3 matrix A. To apply this method, copy the first and second columns of A to form fourth and fifth columns. The determinant of A is then obtained by adding (or subtracting) the products of the six diagonals, as shown in the following diagram. Try confirming that the determinant of A is Example 5: The Determinant of a Matrix of Order 3 Find the determinant of Solution Begin by recopying the first two columns and then computing the six diagonal products as follows. Now, by adding the lower three products and subtracting the upper three products, you can find the determinant of A to be

12

13

14