Matrix Algebra Methods for Dummies FIL November 17 2004 Mikkel Wallentin

Slides:



Advertisements
Similar presentations
Matrix Algebra (and why it’s important!)
Advertisements

CHAPTER ONE Matrices and System Equations
1.5 Elementary Matrices and a Method for Finding
Section 3.1 The Determinant of a Matrix. Determinants are computed only on square matrices. Notation: det(A) or |A| For 1 x 1 matrices: det( [k] ) = k.
Refresher: Vector and Matrix Algebra Mike Kirkpatrick Department of Chemical Engineering FAMU-FSU College of Engineering.
12.1 Systems of Linear Equations: Substitution and Elimination.
Matrices and Systems of Equations
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
Economics 2301 Matrices Lecture 13.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Methods for Dummies FIL January Jon Machtynger & Jen Marchant
Linear regression models in matrix terms. The regression function in matrix terms.
Chapter 5 Determinants.
Intro to Matrices Don’t be scared….
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Linear Algebra and Matrices Methods for Dummies 20 th October, 2010 Melaine Boly Christian Lambert.
Linear Algebra and Matrices
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
3.8 Matrices.
1 Operations with Matrice 2 Properties of Matrix Operations
Linear Algebra, Matrices (and why they matter to (f)MRI!) Methods for Dummies FIL October 2008 Nick Henriquez & Nick Wright Theory & Application Theory.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Linear Algebra & Matrices MfD 2004 María Asunción Fernández Seara January 21 st, 2004 “The beginnings of matrices and determinants.
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
5  Systems of Linear Equations: ✦ An Introduction ✦ Unique Solutions ✦ Underdetermined and Overdetermined Systems  Matrices  Multiplication of Matrices.
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
Compiled By Raj G. Tiwari
1 資訊科學數學 14 : Determinants & Inverses 陳光琦助理教授 (Kuang-Chi Chen)
ECON 1150 Matrix Operations Special Matrices
 Row and Reduced Row Echelon  Elementary Matrices.
Copyright © 2011 Pearson, Inc. 7.3 Multivariate Linear Systems and Row Operations.
Systems of Linear Equation and Matrices
Matrix Algebra. Quick Review Quick Review Solutions.
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.
Sec 3.5 Inverses of Matrices Where A is nxn Finding the inverse of A: Seq or row operations.
Copyright © 2009 Pearson Education, Inc. CHAPTER 9: Systems of Equations and Matrices 9.1 Systems of Equations in Two Variables 9.2 Systems of Equations.
8.1 Matrices & Systems of Equations
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
1 Ch. 4 Linear Models & Matrix Algebra Matrix algebra can be used: a. To express the system of equations in a compact manner. b. To find out whether solution.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Mathematical foundationsModern Seismology – Data processing and inversion 1 Some basic maths for seismic data processing and inverse problems (Refreshement.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Chapter 3 Determinants Linear Algebra. Ch03_2 3.1 Introduction to Determinants Definition The determinant of a 2  2 matrix A is denoted |A| and is given.
Fundamentals of Engineering Analysis
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
1.3 Solutions of Linear Systems
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Chapter 2 Determinants. With each square matrix it is possible to associate a real number called the determinant of the matrix. The value of this number.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Chapter 5 More Work with Matrices
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Section 2.1 Determinants by Cofactor Expansion. THE DETERMINANT Recall from algebra, that the function f (x) = x 2 is a function from the real numbers.
REGRESSION (CONTINUED) Matrices & Matrix Algebra; Multivariate Regression LECTURE 5 Supplementary Readings: Wilks, chapters 6; Bevington, P.R., Robinson,
Linear Algebra Engineering Mathematics-I. Linear Systems in Two Unknowns Engineering Mathematics-I.
Matrices, Vectors, Determinants.
CHAPTER ONE Matrices and System Equations Objective:To provide solvability conditions of a linear equation Ax=b and introduce the Gaussian elimination.
Matrices IB Mathematics SL. Matrices Describing Matrices Adding Matrices.
College Algebra Chapter 6 Matrices and Determinants and Applications
Linear Algebra review (optional)
7.7 Determinants. Cramer’s Rule
5 Systems of Linear Equations and Matrices
Linear Algebra Lecture 19.
DETERMINANT MATRIX YULVI ZAIKA.
2. Matrix Algebra 2.1 Matrix Operations.
Linear Algebra review (optional)
Sec 3.5 Inverses of Matrices
Linear Algebra and Matrices
Presentation transcript:

Matrix Algebra Methods for Dummies FIL November Mikkel Wallentin

Sources Maria Fernandez’ slides (thanks!) from previous MFD course: html html Slides from SPM courses:

Design matrix … =  +  =  + YX data vector design matrix parameters error vector  = the betas (here : 1 to 9)

Scalars, vectors and matrices Scalar: Variable described by a single number – e.g. Image intensity (pixel value) Vector: Variable described by magnitude and direction Square (3 x 3)Rectangular (3 x 2) d i j : i th row, j th column 3 2 Matrix: Rectangular array of scalars

Matrices A matrix is defined by the number of Rows and the number of Columns (eg. a (mxn) matrix has m rows and n columns). A square matrix of order n, is a (nxn) matrix.

Addition (matrix of same size) –Commutative: A+B=B+A –Associative: (A+B)+C=A+(B+C) Eg. Matrix addition

Matrix multiplication Rule: In order to perform the multiplication AB, where A is a (mxn) matrix and B a (kxl) matrix, then we must have n=k. The result will be a (mxl) matrix. Multiplication of a matrix and a constant:

…Each parameter (the betas) assigns a weight to a single column in the design matrix … =  +  =  + YX data vector design matrix parameters error vector  = the betas (here : 1 to 9)

Transposition column → rowrow → column

Outer product = matrix Inner product = scalar Two vectors: Example Note: (1xn)(nx1) -> (1X1) Note: (nx1)(1xn) -> (nXn)

…A contrast estimate is obtained by multiplying the parameter estimates by a transposed contrast vector … =  +  =  + YX data vector design matrix parameters error vector   contrast vector c

SPM{t} A contrast = a linear combination of parameters: c T   c T = divide by estimated standard deviation T test - one dimensional contrasts - SPM{t} T = contrast of estimated parameters variance estimate T = s 2 c(XX) + c s 2 c T (X T X) + c cbcTbcbcTb box-car amplitude > 0 ? =   > 0 ? => Compute 1 x b  + 0 x b  + 0 x b  + 0 x b  + 0 x b  +... and b  b  b  b  b ....

Identity matrices Is there a matrix which plays a similar role as the number 1 in number multiplication? Consider the nxn matrix : For any nxn matrix A, we have A I n = I n A = A For any nxm matrix A, we have I n A = A, and A I m = A

H 0 :  3-9 = ( ) c T = SPM{F} tests multiple linear hypotheses. Ex : does DCT set model anything? F-test (SPM{F}) : a reduced model or... multi-dimensional contrasts ? test H 0 : c T  b = 0 ? X 1 (  3-9 ) X0X0 This model ?Or this one ? H 0 : True model is X 0 X0X

Inverse matrices Definition. A matrix A is called nonsingular or invertible if there exists a matrix B such that: Notation. A common notation for the inverse of a matrix A is A -1. So: The inverse matrix is unique when it exists. So if A is invertible, then A -1 is also invertible and

Determinants Recall that for 2x2 matrices: Determinants are mathematical objects that are very useful in the analysis and solution of systems of linear equations (i.e. GLMs).systems of linear equations The determinant is a function that associates a scalar det(A) to every square matrix A.functionscalarsquare matrix The fundamental geometric meaning of the determinant is as the scale factor for volume when A is regarded as a linear transformation.volumelinear transformation A matrix A has an inverse matrix A -1 if and only if det(A)≠0. Determinants can only be found for square matrices. For a 2x2 matrix A, det(A) = ad-bc. Lets have at closer look at that: And generally :

Matrix Inverse - Calculations A general matrix can be inverted using methods such as the Gauss-Jordan elimination, Gaussian elimination or LU decomposition i.e. Note: det(A)≠0

System of linear equations Imagine a drink made of egg, milk and orange juice. Some of the properties of these ingredients are described in this table: If we now want to make a drink with 540 calories and 25 g of protein, the problem of finding the right amount of the ingredients can be formulated like this: or

A similar problem … =  +  =  + YX data vector design matrix parameters error vector  = the betas (here : 1 to 9)

Cramer’s rule Consider the linear system (in matrix form) A X = B where A is the matrix coefficient, B the nonhomogeneous term, and X the unknown column-matrix. We have: Theorem. The linear system AX = B has a unique solution if and only if A is invertible. In this case, the solution is given by the so-called Cramer's formulas: where xi are the unknowns of the system or the entries of X, and the matrix Ai is obtained from A by replacing the ith column by the column B. In other words, we have where the bi are the entries of B. Thank you Bent Kramer!