Linear Algebra Review.

Slides:



Advertisements
Similar presentations
Lecture 4.
Advertisements

Chapter 4 Systems of Linear Equations; Matrices
Chapter 4 Systems of Linear Equations; Matrices
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Chapter 4 Systems of Linear Equations; Matrices Section 6 Matrix Equations and Systems of Linear Equations.
Matrices: Inverse Matrix
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices.
Review of Matrix Algebra
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Linear regression models in matrix terms. The regression function in matrix terms.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
1 Operations with Matrice 2 Properties of Matrix Operations
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Basics of Linear Algebra A review?. Matrix  Mathematical term essentially corresponding to an array  An arrangement of numbers into rows and columns.
1.3 Matrices and Matrix Operations.
Statistics and Linear Algebra (the real thing). Vector A vector is a rectangular arrangement of number in several rows and one column. A vector is denoted.
1.3 Matrices and Matrix Operations. Definition A matrix is a rectangular array of numbers. The numbers in the array are called the entries in the matrix.
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
4.5 Inverse of a Square Matrix
Chapter 8 Matrices and Determinants Matrix Solutions to Linear Systems.
Learning Objectives for Section 4.5 Inverse of a Square Matrix
Computer Graphics Matrices
Matrices and Determinants
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Linear Algebra by Dr. Shorouk Ossama.
Chapter 4 Systems of Linear Equations; Matrices
Matrices Introduction.
College Algebra Chapter 6 Matrices and Determinants and Applications
INTRODUCTION TO STATISTICS
Chapter 4 Systems of Linear Equations; Matrices
Matrix Arithmetic Prepared by Vince Zaccone
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Matrices and Matrix Operations
Linear Algebraic Equations and Matrices
Chapter 7 Matrix Mathematics
5 Systems of Linear Equations and Matrices
Linear Algebraic Equations and Matrices
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
L6 matrix operations.
Matrix Operations Add and Subtract Matrices Multiply Matrices
Matrices and Vectors Review Objective
Introduction to Summary Statistics
Introduction to Summary Statistics
Systems of First Order Linear Equations
Lecture 03: Linear Algebra
Matrix Algebra.
Introduction to Summary Statistics
Introduction to Summary Statistics
Linear Equations in Linear Algebra
The normal distribution
Introduction to Summary Statistics
2.2 Introduction to Matrices
Matrices and Matrix Operations
Learning Objectives for Section 4.5 Inverse of a Square Matrix
Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors.
Introduction to Summary Statistics
Matrix Algebra.
Basics of Linear Algebra
Chapter 4 Systems of Linear Equations; Matrices
Introduction to Summary Statistics
Linear Algebra review (optional)
Math review - scalars, vectors, and matrices
Laboratory in Oceanography: Data and Methods
Introduction to Summary Statistics
DETERMINANT MATH 80 - Linear Algebra.
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Chapter 4 Systems of Linear Equations; Matrices
Presentation transcript:

Linear Algebra Review

Chapter 0 - Review of linear Algebra Objectives Basic definitions on matrices Matrix multiplications Addition and subtraction of matrices Computing the determinant of a matrix Scaling of a matrix Matrix transformation Transpose and Inverse of a matrix DOT and CROSS Products of vectors

What is a matrix? A matrix is a two dimensional array that stores the elements (numbers, or symbols representing numbers) in m rows and n columns. A matrix might be denoted by a letter such as A and is said to be m-by-n (m×n) in size. Here is an example: Note that indices start from 1 in MATLAB.

Example of a 4-by-4 matrix: What is a matrix? Example of a 4-by-4 matrix: The 4-by-4 matrix on the right hand side can be created in MATLAB using: A = [16 2 3 13; 5 11 10 8; 9 7 6 12; 4 14 15 1] Note that indices start from 1 in MATLAB. Also each row is separated by a “;” and each member by a blank space. If you type the above on MATLAB command line you will get: A = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1

Multiplying two matrices Let B and C be m-by-n and q-by-p matrices respectively. Here is what we can say about the product of these two: B * C is possible iff n = q C * B is possible iff p = m Thus, the product of two matrices is possible when the number of columns on the left matrix is the same as the number of rows on the right matrix. How do we multiply two matrices. We show this in an example: I am sure by going through this example you will figure out how the rows on the first matrix were multiplied by the columns of the second one, one-by-one. Note that we couldn’t multiply C by B, why?

Adding or Subtracting two matrices To add or subtract two matrices, they must be exactly of the same type and size. Example (Addition) Example (Subtraction) In this case, it is possible to do B+C and C+B and they both produce the same result. However, B-C and C-B are possible but do not produce the same result.

Multiplying a matrix by a constant or Identity Matrix When you multiply a matrix by a constant, all elements of the matrix will be multiplied by that constant. The is referred to as scaling. Example (const=4): The Identity matrix is a square matrix (number of rows and columns are the same), where the diagonal values of the matrix are all 1 and the rest of the elements are 0. When multiplied by another matrix of the same size, identity matrix produces the original matrix.

Computing the determinant of a matrix Each square matrix of arbitrary size has a number called determinant of the matrix. This number is computed through a process. Let’s try a 2-by-2 matrix first: This is a bit more complicated when matrix is of larger size. Let’s try a 3-by-3 matrix. Similarly, for a 4-by-4 matrix, you will go through three steps: 1) Take the header of the first row, with corresponding 3-by-3 matrices underneath, 2) Process the 3-by-3 matrices by repeating the steps in the above example, 3) Compute the determinant of the 2-by-2 matrices and unfold them to find the final result.

Transpose and Inverse of a Matrix The transpose of a matrix is the same matrix with rows and columns switched. The transpose of the A is: The inverse of a matrix, A-1, is the matrix that produced the unit matrix I when it is multiplied by the matrix itself. I = A-1* A. There are several ways to compute the inverse of a matrix. We will introduce the most common one here. Perhaps, we need to find out whether a matrix has an inverse (invertible). If a matrix is not invertible, it is singular. An n-by-n matrix A is invertible if there exists an n-by-n matrix C such that AC = CA = I, where I is the identity matrix.

Inverse of a Matrix How do we find the inverse of a matrix? See example below. We wish to compute A-1: First place the identity matrix of the same size on the right-hand-side of the original matrix. Then, work out through steps to move the identity matrix to the left-hand-side. Once that is accomplished, the matrix on the right-hand-side will be the inverse. Step1: we need to get ride of 4 on the first row. Thus, we will use: row1 = row1 – (.5) row2 Step2: we need to get ride of 6 on the second row. Thus, row2 = row2 + 6row1 Step3: The matrix on the left is almost ready. The next thing we need to do is to divide the each row by a number to produce the identity matrix on the left. Row1=row1*(-1), row2 = row2/8 As you notice the identity matrix has moved to the left-hand-side and thus the right-hand-side matrix is the inverse.

What is the angle between these two vectors? DOT Product The DOT product of vector will be a scalar and can also be defined as: The DOT product of two orthogonal (vertical) vectors is 0. Example: v = 2i + 3j – 4k and u = 2i - 3j + 2k What is the angle between these two vectors? First we need to compute the magnitude (length) of each vector.

Example: v = 2i + 3j – 4k and u = 2i - 3j + 2k CROSS Product The CROSS product can be defined as: Example: v = 2i + 3j – 4k and u = 2i - 3j + 2k Note: The result is a vector

Statistics Review

Chapter 0 - Review of Statistics Objectives Computing the mean (average) Finding the median Computing the variance Computing standard deviation Probability and random numbers Probability distribution function Cumulative distribution function

Computing mean and median The mean of a set of values is the weighted average of the possible values in that set. Basically sum of all values divided by the number of values. Sometimes this can be written as the sum shown on the right-hand-side. Where f denotes the number of occurrences of a particular value being observed in the set. The median is the point in the sequence where the set is divided into two equal parts each containing ½ of the values. Example: X = {2, 12, 4, 12, 7, 3, 5, 12, 4, 8, 2} Sorted X={2, 2, 3, 4, 4, 5, 7, 8, 12, 12, 12} The number in the middle of this set is 5, that is the median. What if we had an even number of values? What is the average? Values f (frequency) 2 3 1 4 5 7 8 12

Measure of Variation The mean and median do not describe the amount of dispersion or variation among the observed values. See examples below: All three have the same median and mean. The first measure of variance is range. Once again let’s consider X = {2, 12, 4, 12, 7, 3, 5, 12, 4, 8, 2}. Range defines the difference between the largest and the smallest values. Range = 12-2 = 10. The second measure of variation is the mean deviation, which is defined as:

Measure of Variation The most commonly used measure for the variation is sample variance referred to as variance. For the X = {2, 12, 4, 12, 7, 3, 5, 12, 4, 8, 2}, this will be: The standard deviation is an important measure deviation usually referred to as the error and is defined as:

MATLAB Examples Let the columns represent heart rate, weight and hours of exercise per week

Random numbers and probability Probability of an event, xi, is the chance of observing that event when a large number of observations have been made. This is defined as:   Where, Nx represents the number of times that that particular event have been observed and N represents the total number of observations. Of course, the sum of all probabilities must be 1, i.e., if you try all the possibilities, then you must observe all events. For example in the set: X = {2, 12, 4, 12, 7, 3, 5, 12, 4, 8, 2} Note: The sum of all these probabilities is 1: A random set is a set in which the probability of a variable appearing is the same as that of all other variables. Since we cannot create perfectly random values we use pseudo random generators to produce a set of values.

Probability Distribution and Cumulative Distribution In the previous example we had: PDF CDF This is simply plotting the probabilities of each values as they are observed. Using this type of distribution we can easily tell which one of the values were seen most often This is the cumulative probabilities as we get to the next values. The final result is always 1. That is where all possible values are observed