Mathematics and Signal Processing for Biomechanics

Size: px
Start display at page:

Download "Mathematics and Signal Processing for Biomechanics"

Transcription

1 KAAP686 Mathematics and Signal Processing for Biomechanics More on Matrices Now we discuss the topic of matrix division and apply this idea to solve a system of linear equations. We will define the inverse* of a matrix, for example B -1 =inverse of B. Then, instead of dividing one matrix by another (C=A/B), w we will multiply by the inverse (C=B -1 A). *It is really the multiplicative inverse of a matrix. A matrix also has an additive inverse, which is its negative. However, it is customary to say inverse instead of multiplicative inverse. Only a mathematician would talk about the additive inverse of a matrix. 1. Matrix inverse A is the inverse of B (and vice versa) iff AB = BA = I Example: A=[1 2; 3 5] B=[-5 2; 3-1]. Show AB = I and BA = I. Not all matrices have inverses: for example the zero matrix, and the matrix [1 0; 0 0]. Matrix with no inverse is noninvertible or singular. Symbol for inverse: A -1. If A has an inverse, it has only 1 inverse. Set up eqn for inverse of a 2x2 matrix, then show that it ends up being 4 eqns in 4 unknowns. A=[a b; c d]; A -1 =[e f; g h]; A A -1 = I Then show that for 2x2 matrix, A -1 = (1/detA)*[d -b; -c a] is true, because this solution to the inverse makes A A -1 = I. Use Matlab to do example: >> A=[2 1 3;2 1 1;4 5 1] >> B=inv(A) >> C=A*B >> D=B*A Inverses and solution to a linear system of equations The solution to the system Ax = b, where A is a matrix and x, b are vectors, is x = A -1 b. Example: Same equations as above, but now define >>b=[6; -12; 3] >> x=inv(a)*b and check by doing >> c=a*x Inverse of product of matrices If A, B are invertible, so is AB, and inv(ab) = inv(b)*inv(a) 2. Special Matrices & Additional Properties

2 Diagonal matrix: square matrix with off-diagonal elements = 0. Transpose of a matrix: denoted A T or A. Interchange the rows and columns. Transpose of n-bym matrix is m-by-n. Properties of transposes: (A T ) T = A (AB) T = B T A T (A T ) -1 = (A -1 ) T Symmetric matrices: A is symmetric if A = A T 3. Matrices as maps [In notes below, when I refer to vector (1 0) or (a c), etc., I mean the corresponding column vectors, but I write them (1 0) because it s easier to write.] 2x2 matrix = linear transformation = mapping from x-y plane into another x-y plane (call it x -y if you wish). The linear 2x2 mapping sends straight lines into straight lines, parallel lines into parallel lines, but generally does not preserve angles between lines, which means lines at right angles in the starting plane may not be mapped into lines at right angles in the new plane. Consider and show how vectors (1,0) and (0,1) get mapped to vectors (a,c) and (b,d) by the transformation A whose matrix is A=[a b; c d]. Unit square mapped into parallelogram; its area =side x side x sinθ which is computed by taking cross product of the 2 vectors (as if they were 3D vectors with z coordinates = 0). The cross product of (a,c,0) and (b,d,0) is found by taking determinant of 3x3 matrix with rows (i, j, k); (a, c, 0); (b, d, 0). This gives vector 0i+0j+ (ad-bc)k, whose length is (ad-bc). This length is the area of the parallelogram. So the original unit square gets mapped into a parallelogram with area = ad-bc = det(a). det(a) is the area magnification factor for the transformation A. If det(a) < 0, then the unit square in the original x-y plane gets flipped by the transformation, and the direction of the cross product of (a c) with (b d) is opposite to the direction of the cross product of (1 0) with (0 1). If det(a) = 0 then the whole x-y plane gets mapped into a line (so the area of the original unit square becomes 0 after transformation). Inverse of the A matrix (A -1 ) is a matrix that undoes what A does. Therefore A -1 acting on (a c) maps it to (1,0), and A -1 maps (b d) to (0 1). If det(a)=0, which means whole plane gets mapped into a line, then many points are being mapped into same point, and there s no way to go backwards because a given point on the line in the new plane could have come from an infinite number of points in the starting plane, and there s no way to tell which one to go back to. This explains, in terms of mapping, why a matrix with det(a)=0 does not have an inverse: because there s no way to undo the mapping corresponding to A. 4. Uses of matrices in biomechanics 4a. Rotations.

3 Rotations are covered in a separate set of notes. 4b. Statistics. The covariance matrix arises when analyzing multidimensional data. An example of multi- (two-)dimensional data is the center of pressure (x- and y-coordinates) measured as a function of time. Another example of multidimensional data is the EMG activity from several muscles measured at the same time, such as leg muscles during walking. The covariance matrix measures how much the variables vary in synchrony with one another. Analysis of the covariance matrix can sometimes give deeper insight into the data. For example, the covariance matrix is used in principle component analysis (which we will not discuss here). If there are 2 variables, the covariance matrix is 2x2; if there are 6 variables, the covariance matrix is 6x6. The covariance matrix for two-dimensional data is measured at n time points [var(x) cov(x,y)] Cov(x,y)= [cov(x,y) var(y)] where var(x) = (1/(n-1)) Sum(x i -x bar ) 2 var(y) = (1/(n-1)) Sum(y i -y bar ) 2 cov(x,y) = (1/(n-1)) Sum(x i -x bar )(y i -y bar ). Cov(x, y) = var(x) cov(x, y) cov(y, x) var(y) where var(x) = 1 n n 1 (x i x ) 2 i=1 var(y) = 1 n n 1 (y i y ) 2 i=1 cov(x, y) = cov(y, x) = 1 n n 1 (x i x ) (y i y ) The diagonal elements of the covariance matrix are just the usual variances of x(t) and of y(t). The covariance matrix is symmetric. If x(t) and y(t) are the coordinates of the body s center of mass during standing, then the covariance matrix can be useful for understanding normal and abnormal balance. If there are m variables and n measurement times, arrange the data in an array X with m columns and n rows. Then the covariance matrix can be computed by array multiplication: Cov(X) = (1/(n-1)) X T X Cov(X) = 1 n 1 XT X i=1

4 Since we have multiplied (m n) (n m), the result is (m m). (Remember that when the dimensions of multiplied arrays are written this way, the inner dimensions, n and n in this case, must match each other, and the resulting matrix has dimensions given by the outer dimensions.) 4c. Mechanics The deformation of an object, or of a little cube of material within that object, in response to applied forces, can be represented by a 3x3 matrix (i.e. a 2-dimensional array) called the strain tensor. It turns out that this matrix is symmetric. Forces on an object can be represented by another symmetric 3x3 matrix called the stress tensor. For many materials, including biological materials, the relation between stress (applied force) and strain (deformation) is linear, as long as the applied force is not too great. In this linear range, stress and strain are related to one another by a 4-dimensional array, the 3x3x3x3 elasticity tensor, which represents the properties of the material. For convenience, the strain and stress tensors (which have 6 independent elements each, since they are symmetric 3x3 matrices) are sometimes represented as 6-element vectors. This allows the elasticity tensor to be represented as a 6x6 matrix. Take a course in solid mechanics to understand these ideas more fully. 4d. Force Plate Calibration A force plate is a black box with six inputs (3 forces, 3 moments) and six outputs. On some force plates, including all older models, the outputs are voltages. (Newer models may have digital outputs which are numbers with units of N or N-m.) The user measures the outputs and wants to know the inputs. The ideal force plate has one output uniquely associated with each input, and a linear input/output relation for each such channel. In other words, the ideal force plate is linear and has no crosstalk. Actual force plates are not ideal. Manufacturers work hard to eliminate nonlinearity. Nonetheless, nonlinearities are sometimes noticeable, especially if a force plate has been damaged, is mounted incorrectly, or has debris in the mounting chamber. Crosstalk describes the situation where the output signal for one input also contains components from other inputs. For example, the output signal for Fx might be slightly corrupted by contributions from the other inputs. If the system is linear, each output signal is a (different) linear combination of all the inputs: Channel 1 (volts) = V Fx = a 11 F x + a 12 F y + a 13 F z + a 14 M x + a 15 M y + a 16 M z, Channel 2 (volts) = V Fy = a 21 F x + a 22 F y + a 23 F z + a 24 M x + a 25 M y + a 26 M z, and so on. We can write this with vectors and a matrix: VFx a11 a12 a13 a14 a15 a16 Fx V Fy F y a a a a a a V Fz a31 a32 a33 a34 a35 a 36 F = x VMx a41 a42 a43 a44 a45 a46 M x V a My 51 a52 a53 a54 a55 a 56 M y V a Mz 61 a62 a63 a64 a65 a 66 M z which we write compactly as V = A F. An ideal forceplate with no crosstalk will have values of zero for all off-diagonal matrix elements. The user can find the individual forces and moments, even if there is crosstalk, if the elements of A are known. V = A F (from above)

5 A -1 V = (A -1 A) F (pre-multiply by inverse of A on both sides) A -1 V = I F (I=identity matrix) F = A -1 V (desired solution: the vector of forces and moments) In other words, to get the individual forces and moments, multiply the inverse of A by the voltage vector. Newer force plates do this matrix multiplication internally, and provide voltage outputs that are pure (free of crosstalk) and require only scalar multiplication to get the forces and moments. On older models, the user must do the matrix multiplication, using values for the elements of A or A -1 provided by the manufacturer. Example from AMTI forceplate, model OR , s/n 3233, assuming 10 V excitation. A= (Values are μv/n in columns 1-3 and μv/(n-m) in columns 4-6.) See Appendix A of Vicon_workstation_reference.pdf in reserve section of course web site. (File also available (as of ) at 4e. Change of Coordinate System Often we have data in one coordinate system and we need to convert it to another coordinate system. For example, we might obtain the location of the center of pressure in force place coordinates (a coordinate system local to the force plate, set by the manufacturer) and we need to convert it to laboratory coordinates. The diagram shows the two coordinate systems. Vector r denote the origin of system 1 in the coordinates of system 2. The unit vectors of coordinate system 1 are u 1 1, u 2 1, and u 3 1. The unit vectors of coordinate system 2 are u 1 2, u 2 2,

6 and u 2 3. The angle between unit vectors u 1 i (in system 1) and u 2 j (in system 2) is θ ij. We use these angles to create the direction cosines matrix R as follows: cos θ 11 cos θ 12 cos θ 13 R = cos θ 21 cos θ 22 cos θ 23 cos θ 31 cos θ 32 cos θ 33 A location in system 1 coordinates is denoted x 1 = y 1. The same location expressed in z 1 x 2 system 2 coordinates is x 2 = y 2. The two are related by a rotation and a translation: z 2 x 2 = R x 1 + r Consider, for example, the figure below, which was modified from a force plate manual (retrieved from It shows the force plate coordinate system (subscript f), and the lab coordinate system (subscript L), which is offset and rotated. If we know the center of pressure location in force plate coordinates, COP f = x f y f, we will want to convert it to lab coordinates. In this case, the vector r, which describes z f 20 the origin of the force plate system in the lab system coordinates, is r = 30. The angles 0.25 θ ij.between unit vector i in system 1 and unit vector j in system 2 are θ 11 (between x f and x L )=180, θ 12 (between x f and y L )= 90, θ 13 = 90, θ 21 = 90, θ 22 (between y f and y L )= 0, θ 23 = 90, θ 31 = 90, θ 32 = 90, θ 33 = 180. Therefore the direction cosines matrix R is R = The center of pressure location in lab coordinates is 1 COP L = R COP f + r x 1

7 Note that the equation above for transforming locations is NOT correct for transforming forces or torques from one coordinate system to another. This is because force vectors and torque vectors are not anchored to one spot, and so are not affected by translations of the coordinate system. They are affected by rotations of the coordinate system, however. The equation for transforming a force vector from system1 to system 2 coordinates is f 2 = R f 1 where f 1 and f 2 are the force vector expressed in the two coordinate systems, and R is the matrix of direction cosines given above. The same equation can be used to transform torque vectors. Copyright 2013 William C. Rose

Introduction to Matrix Algebra

Introduction to Matrix Algebra Introduction to Matrix Algebra August 18, 2010 1 Vectors 1.1 Notations A p-dimensional vector is p numbers put together. Written as x 1 x =. x p. When p = 1, this represents a point in the line. When p

More information

MATH2210 Notebook 2 Spring 2018

MATH2210 Notebook 2 Spring 2018 MATH2210 Notebook 2 Spring 2018 prepared by Professor Jenny Baglivo c Copyright 2009 2018 by Jenny A. Baglivo. All Rights Reserved. 2 MATH2210 Notebook 2 3 2.1 Matrices and Their Operations................................

More information

7.6 The Inverse of a Square Matrix

7.6 The Inverse of a Square Matrix 7.6 The Inverse of a Square Matrix Copyright Cengage Learning. All rights reserved. What You Should Learn Verify that two matrices are inverses of each other. Use Gauss-Jordan elimination to find inverses

More information

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p Math Bootcamp 2012 1 Review of matrix algebra 1.1 Vectors and rules of operations An p-dimensional vector is p numbers put together. Written as x 1 x =. x p. When p = 1, this represents a point in the

More information

Elementary maths for GMT

Elementary maths for GMT Elementary maths for GMT Linear Algebra Part 2: Matrices, Elimination and Determinant m n matrices The system of m linear equations in n variables x 1, x 2,, x n a 11 x 1 + a 12 x 2 + + a 1n x n = b 1

More information

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations. POLI 7 - Mathematical and Statistical Foundations Prof S Saiegh Fall Lecture Notes - Class 4 October 4, Linear Algebra The analysis of many models in the social sciences reduces to the study of systems

More information

Mathematics for Graphics and Vision

Mathematics for Graphics and Vision Mathematics for Graphics and Vision Steven Mills March 3, 06 Contents Introduction 5 Scalars 6. Visualising Scalars........................ 6. Operations on Scalars...................... 6.3 A Note on

More information

Linear Algebra (Review) Volker Tresp 2018

Linear Algebra (Review) Volker Tresp 2018 Linear Algebra (Review) Volker Tresp 2018 1 Vectors k, M, N are scalars A one-dimensional array c is a column vector. Thus in two dimensions, ( ) c1 c = c 2 c i is the i-th component of c c T = (c 1, c

More information

Calculus II - Basic Matrix Operations

Calculus II - Basic Matrix Operations Calculus II - Basic Matrix Operations Ryan C Daileda Terminology A matrix is a rectangular array of numbers, for example 7,, 7 7 9, or / / /4 / / /4 / / /4 / /6 The numbers in any matrix are called its

More information

Matrices. Chapter Definitions and Notations

Matrices. Chapter Definitions and Notations Chapter 3 Matrices 3. Definitions and Notations Matrices are yet another mathematical object. Learning about matrices means learning what they are, how they are represented, the types of operations which

More information

Matrix Arithmetic. j=1

Matrix Arithmetic. j=1 An m n matrix is an array A = Matrix Arithmetic a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn of real numbers a ij An m n matrix has m rows and n columns a ij is the entry in the i-th row and j-th column

More information

Linear Algebra (Review) Volker Tresp 2017

Linear Algebra (Review) Volker Tresp 2017 Linear Algebra (Review) Volker Tresp 2017 1 Vectors k is a scalar (a number) c is a column vector. Thus in two dimensions, c = ( c1 c 2 ) (Advanced: More precisely, a vector is defined in a vector space.

More information

CHAPTER 8: Matrices and Determinants

CHAPTER 8: Matrices and Determinants (Exercises for Chapter 8: Matrices and Determinants) E.8.1 CHAPTER 8: Matrices and Determinants (A) means refer to Part A, (B) means refer to Part B, etc. Most of these exercises can be done without a

More information

Review of Linear Algebra

Review of Linear Algebra Review of Linear Algebra Definitions An m n (read "m by n") matrix, is a rectangular array of entries, where m is the number of rows and n the number of columns. 2 Definitions (Con t) A is square if m=

More information

Phys 201. Matrices and Determinants

Phys 201. Matrices and Determinants Phys 201 Matrices and Determinants 1 1.1 Matrices 1.2 Operations of matrices 1.3 Types of matrices 1.4 Properties of matrices 1.5 Determinants 1.6 Inverse of a 3 3 matrix 2 1.1 Matrices A 2 3 7 =! " 1

More information

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to : MAC 0 Module Systems of Linear Equations and Matrices II Learning Objectives Upon completing this module, you should be able to :. Find the inverse of a square matrix.. Determine whether a matrix is invertible..

More information

Honors Advanced Mathematics Determinants page 1

Honors Advanced Mathematics Determinants page 1 Determinants page 1 Determinants For every square matrix A, there is a number called the determinant of the matrix, denoted as det(a) or A. Sometimes the bars are written just around the numbers of the

More information

LS.1 Review of Linear Algebra

LS.1 Review of Linear Algebra LS. LINEAR SYSTEMS LS.1 Review of Linear Algebra In these notes, we will investigate a way of handling a linear system of ODE s directly, instead of using elimination to reduce it to a single higher-order

More information

ECON 186 Class Notes: Linear Algebra

ECON 186 Class Notes: Linear Algebra ECON 86 Class Notes: Linear Algebra Jijian Fan Jijian Fan ECON 86 / 27 Singularity and Rank As discussed previously, squareness is a necessary condition for a matrix to be nonsingular (have an inverse).

More information

Matrix & Linear Algebra

Matrix & Linear Algebra Matrix & Linear Algebra Jamie Monogan University of Georgia For more information: http://monogan.myweb.uga.edu/teaching/mm/ Jamie Monogan (UGA) Matrix & Linear Algebra 1 / 84 Vectors Vectors Vector: A

More information

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices Graphics 2009/2010, period 1 Lecture 4 Matrices m n matrices Matrices Definitions Diagonal, Identity, and zero matrices Addition Multiplication Transpose and inverse The system of m linear equations in

More information

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT Math Camp II Basic Linear Algebra Yiqing Xu MIT Aug 26, 2014 1 Solving Systems of Linear Equations 2 Vectors and Vector Spaces 3 Matrices 4 Least Squares Systems of Linear Equations Definition A linear

More information

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33 Linear Algebra 1/33 Vectors A vector is a magnitude and a direction Magnitude = v Direction Also known as norm, length Represented by unit vectors (vectors with a length of 1 that point along distinct

More information

Chapter 2: Numeric, Cell, and Structure Arrays

Chapter 2: Numeric, Cell, and Structure Arrays Chapter 2: Numeric, Cell, and Structure Arrays Topics Covered: Vectors Definition Addition Multiplication Scalar, Dot, Cross Matrices Row, Column, Square Transpose Addition Multiplication Scalar-Matrix,

More information

a11 a A = : a 21 a 22

a11 a A = : a 21 a 22 Matrices The study of linear systems is facilitated by introducing matrices. Matrix theory provides a convenient language and notation to express many of the ideas concisely, and complicated formulas are

More information

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27 Chapter 2 Ma 322 Fall 2013 Ma 322 Sept 23-27 Summary ˆ Matrices and their Operations. ˆ Special matrices: Zero, Square, Identity. ˆ Elementary Matrices, Permutation Matrices. ˆ Voodoo Principle. What is

More information

Quantum Computing Lecture 2. Review of Linear Algebra

Quantum Computing Lecture 2. Review of Linear Algebra Quantum Computing Lecture 2 Review of Linear Algebra Maris Ozols Linear algebra States of a quantum system form a vector space and their transformations are described by linear operators Vector spaces

More information

7.4. The Inverse of a Matrix. Introduction. Prerequisites. Learning Outcomes

7.4. The Inverse of a Matrix. Introduction. Prerequisites. Learning Outcomes The Inverse of a Matrix 7.4 Introduction In number arithmetic every number a 0has a reciprocal b written as a or such that a ba = ab =. Similarly a square matrix A may have an inverse B = A where AB =

More information

TOPIC III LINEAR ALGEBRA

TOPIC III LINEAR ALGEBRA [1] Linear Equations TOPIC III LINEAR ALGEBRA (1) Case of Two Endogenous Variables 1) Linear vs. Nonlinear Equations Linear equation: ax + by = c, where a, b and c are constants. 2 Nonlinear equation:

More information

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1 1 Rows first, columns second. Remember that. R then C. 1 A matrix is a set of real or complex numbers arranged in a rectangular array. They can be any size and shape (provided they are rectangular). A

More information

1 Matrices and matrix algebra

1 Matrices and matrix algebra 1 Matrices and matrix algebra 1.1 Examples of matrices A matrix is a rectangular array of numbers and/or variables. For instance 4 2 0 3 1 A = 5 1.2 0.7 x 3 π 3 4 6 27 is a matrix with 3 rows and 5 columns

More information

Elementary Linear Algebra

Elementary Linear Algebra Matrices J MUSCAT Elementary Linear Algebra Matrices Definition Dr J Muscat 2002 A matrix is a rectangular array of numbers, arranged in rows and columns a a 2 a 3 a n a 2 a 22 a 23 a 2n A = a m a mn We

More information

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34 Linear Algebra /34 Vectors A vector is a magnitude and a direction Magnitude = v Direction Also known as norm, length Represented by unit vectors (vectors with a length of 1 that point along distinct axes)

More information

A = 3 B = A 1 1 matrix is the same as a number or scalar, 3 = [3].

A = 3 B = A 1 1 matrix is the same as a number or scalar, 3 = [3]. Appendix : A Very Brief Linear ALgebra Review Introduction Linear Algebra, also known as matrix theory, is an important element of all branches of mathematics Very often in this course we study the shapes

More information

A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 2010

A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 2010 A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 00 Introduction Linear Algebra, also known as matrix theory, is an important element of all branches of mathematics

More information

Examples of linear systems and explanation of the term linear. is also a solution to this equation.

Examples of linear systems and explanation of the term linear. is also a solution to this equation. . Linear systems Examples of linear systems and explanation of the term linear. () ax b () a x + a x +... + a x b n n Illustration by another example: The equation x x + 5x 7 has one solution as x 4, x

More information

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero.

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero. Finite Mathematics Chapter 2 Section 2.1 Systems of Linear Equations: An Introduction Systems of Equations Recall that a system of two linear equations in two variables may be written in the general form

More information

System of Linear Equations. Slide for MA1203 Business Mathematics II Week 1 & 2

System of Linear Equations. Slide for MA1203 Business Mathematics II Week 1 & 2 System of Linear Equations Slide for MA1203 Business Mathematics II Week 1 & 2 Function A manufacturer would like to know how his company s profit is related to its production level. How does one quantity

More information

+ MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS

+ MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS + MATRIX VARIABLES AND TWO DIMENSIONAL ARRAYS Matrices are organized rows and columns of numbers that mathematical operations can be performed on. MATLAB is organized around the rules of matrix operations.

More information

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra A. Vectors A vector is a quantity that has both magnitude and direction, like velocity. The location of a vector is irrelevant;

More information

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

MAT 1332: CALCULUS FOR LIFE SCIENCES. Contents. 1. Review: Linear Algebra II Vectors and matrices Definition. 1.2. MAT 1332: CALCULUS FOR LIFE SCIENCES JING LI Contents 1 Review: Linear Algebra II Vectors and matrices 1 11 Definition 1 12 Operations 1 2 Linear Algebra III Inverses and Determinants 1 21 Inverse Matrices

More information

Basic Linear Algebra in MATLAB

Basic Linear Algebra in MATLAB Basic Linear Algebra in MATLAB 9.29 Optional Lecture 2 In the last optional lecture we learned the the basic type in MATLAB is a matrix of double precision floating point numbers. You learned a number

More information

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full n n matrices Matrices Definitions Diagonal, Identity, and zero matrices Addition Multiplication Transpose and inverse The system of m linear equations in n variables x 1, x 2,..., x n a 11 x 1 + a 12 x

More information

Lecture 3: Matrix and Matrix Operations

Lecture 3: Matrix and Matrix Operations Lecture 3: Matrix and Matrix Operations Representation, row vector, column vector, element of a matrix. Examples of matrix representations Tables and spreadsheets Scalar-Matrix operation: Scaling a matrix

More information

Linear Algebra Review. Fei-Fei Li

Linear Algebra Review. Fei-Fei Li Linear Algebra Review Fei-Fei Li 1 / 51 Vectors Vectors and matrices are just collections of ordered numbers that represent something: movements in space, scaling factors, pixel brightnesses, etc. A vector

More information

Linear Algebra V = T = ( 4 3 ).

Linear Algebra V = T = ( 4 3 ). Linear Algebra Vectors A column vector is a list of numbers stored vertically The dimension of a column vector is the number of values in the vector W is a -dimensional column vector and V is a 5-dimensional

More information

Rigid Geometric Transformations

Rigid Geometric Transformations Rigid Geometric Transformations Carlo Tomasi This note is a quick refresher of the geometry of rigid transformations in three-dimensional space, expressed in Cartesian coordinates. 1 Cartesian Coordinates

More information

Chapter 8. Rigid transformations

Chapter 8. Rigid transformations Chapter 8. Rigid transformations We are about to start drawing figures in 3D. There are no built-in routines for this purpose in PostScript, and we shall have to start more or less from scratch in extending

More information

2. Matrix Algebra and Random Vectors

2. Matrix Algebra and Random Vectors 2. Matrix Algebra and Random Vectors 2.1 Introduction Multivariate data can be conveniently display as array of numbers. In general, a rectangular array of numbers with, for instance, n rows and p columns

More information

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

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ] Matrices: Definition: An m n matrix, A m n is a rectangular array of numbers with m rows and n columns: a, a, a,n a, a, a,n A m,n =...... a m, a m, a m,n Each a i,j is the entry at the i th row, j th column.

More information

Multiplying matrices by diagonal matrices is faster than usual matrix multiplication.

Multiplying matrices by diagonal matrices is faster than usual matrix multiplication. 7-6 Multiplying matrices by diagonal matrices is faster than usual matrix multiplication. The following equations generalize to matrices of any size. Multiplying a matrix from the left by a diagonal matrix

More information

Linear Algebra March 16, 2019

Linear Algebra March 16, 2019 Linear Algebra March 16, 2019 2 Contents 0.1 Notation................................ 4 1 Systems of linear equations, and matrices 5 1.1 Systems of linear equations..................... 5 1.2 Augmented

More information

1 Matrices and Systems of Linear Equations. a 1n a 2n

1 Matrices and Systems of Linear Equations. a 1n a 2n March 31, 2013 16-1 16. Systems of Linear Equations 1 Matrices and Systems of Linear Equations An m n matrix is an array A = (a ij ) of the form a 11 a 21 a m1 a 1n a 2n... a mn where each a ij is a real

More information

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations Chapter 1: Systems of linear equations and matrices Section 1.1: Introduction to systems of linear equations Definition: A linear equation in n variables can be expressed in the form a 1 x 1 + a 2 x 2

More information

Linear Algebra and Matrices

Linear Algebra and Matrices Linear Algebra and Matrices 4 Overview In this chapter we studying true matrix operations, not element operations as was done in earlier chapters. Working with MAT- LAB functions should now be fairly routine.

More information

Matrices and systems of linear equations

Matrices and systems of linear equations Matrices and systems of linear equations Samy Tindel Purdue University Differential equations and linear algebra - MA 262 Taken from Differential equations and linear algebra by Goode and Annin Samy T.

More information

3D Stress Tensors. 3D Stress Tensors, Eigenvalues and Rotations

3D Stress Tensors. 3D Stress Tensors, Eigenvalues and Rotations 3D Stress Tensors 3D Stress Tensors, Eigenvalues and Rotations Recall that we can think of an n x n matrix Mij as a transformation matrix that transforms a vector xi to give a new vector yj (first index

More information

Introduction to Determinants

Introduction to Determinants Introduction to Determinants For any square matrix of order 2, we have found a necessary and sufficient condition for invertibility. Indeed, consider the matrix The matrix A is invertible if and only if.

More information

Matrices and Linear Algebra

Matrices and Linear Algebra Contents Quantitative methods for Economics and Business University of Ferrara Academic year 2017-2018 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2 3 4 5 Contents 1 Basics 2

More information

Section 12.4 Algebra of Matrices

Section 12.4 Algebra of Matrices 244 Section 2.4 Algebra of Matrices Before we can discuss Matrix Algebra, we need to have a clear idea what it means to say that two matrices are equal. Let's start a definition. Equal Matrices Two matrices

More information

POLI270 - Linear Algebra

POLI270 - Linear Algebra POLI7 - Linear Algebra Septemer 8th Basics a x + a x +... + a n x n b () is the linear form where a, b are parameters and x n are variables. For a given equation such as x +x you only need a variable and

More information

Introduction to Computational Finance and Financial Econometrics Matrix Algebra Review

Introduction to Computational Finance and Financial Econometrics Matrix Algebra Review You can t see this text! Introduction to Computational Finance and Financial Econometrics Matrix Algebra Review Eric Zivot Spring 2015 Eric Zivot (Copyright 2015) Matrix Algebra Review 1 / 54 Outline 1

More information

[POLS 8500] Review of Linear Algebra, Probability and Information Theory

[POLS 8500] Review of Linear Algebra, Probability and Information Theory [POLS 8500] Review of Linear Algebra, Probability and Information Theory Professor Jason Anastasopoulos ljanastas@uga.edu January 12, 2017 For today... Basic linear algebra. Basic probability. Programming

More information

Section 2.2: The Inverse of a Matrix

Section 2.2: The Inverse of a Matrix Section 22: The Inverse of a Matrix Recall that a linear equation ax b, where a and b are scalars and a 0, has the unique solution x a 1 b, where a 1 is the reciprocal of a From this result, it is natural

More information

Maths for Signals and Systems Linear Algebra for Engineering Applications

Maths for Signals and Systems Linear Algebra for Engineering Applications Maths for Signals and Systems Linear Algebra for Engineering Applications Lectures 1-2, Tuesday 11 th October 2016 DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON

More information

MATH 323 Linear Algebra Lecture 6: Matrix algebra (continued). Determinants.

MATH 323 Linear Algebra Lecture 6: Matrix algebra (continued). Determinants. MATH 323 Linear Algebra Lecture 6: Matrix algebra (continued). Determinants. Elementary matrices Theorem 1 Any elementary row operation σ on matrices with n rows can be simulated as left multiplication

More information

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes.

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes. Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes Matrices and linear equations A matrix is an m-by-n array of numbers A = a 11 a 12 a 13 a 1n a 21 a 22 a 23 a

More information

22A-2 SUMMER 2014 LECTURE 5

22A-2 SUMMER 2014 LECTURE 5 A- SUMMER 0 LECTURE 5 NATHANIEL GALLUP Agenda Elimination to the identity matrix Inverse matrices LU factorization Elimination to the identity matrix Previously, we have used elimination to get a system

More information

Rigid Geometric Transformations

Rigid Geometric Transformations Rigid Geometric Transformations Carlo Tomasi This note is a quick refresher of the geometry of rigid transformations in three-dimensional space, expressed in Cartesian coordinates. 1 Cartesian Coordinates

More information

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of . Matrices A matrix is any rectangular array of numbers. For example 3 5 6 4 8 3 3 is 3 4 matrix, i.e. a rectangular array of numbers with three rows four columns. We usually use capital letters for matrices,

More information

M. Matrices and Linear Algebra

M. Matrices and Linear Algebra M. Matrices and Linear Algebra. Matrix algebra. In section D we calculated the determinants of square arrays of numbers. Such arrays are important in mathematics and its applications; they are called matrices.

More information

. a m1 a mn. a 1 a 2 a = a n

. a m1 a mn. a 1 a 2 a = a n Biostat 140655, 2008: Matrix Algebra Review 1 Definition: An m n matrix, A m n, is a rectangular array of real numbers with m rows and n columns Element in the i th row and the j th column is denoted by

More information

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

Linear Algebra: Lecture Notes. Dr Rachel Quinlan School of Mathematics, Statistics and Applied Mathematics NUI Galway Linear Algebra: Lecture Notes Dr Rachel Quinlan School of Mathematics, Statistics and Applied Mathematics NUI Galway November 6, 23 Contents Systems of Linear Equations 2 Introduction 2 2 Elementary Row

More information

A Review of Linear Algebra

A Review of Linear Algebra A Review of Linear Algebra Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab: Implementations

More information

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti Mobile Robotics 1 A Compact Course on Linear Algebra Giorgio Grisetti SA-1 Vectors Arrays of numbers They represent a point in a n dimensional space 2 Vectors: Scalar Product Scalar-Vector Product Changes

More information

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2 Week 22 Equations, Matrices and Transformations Coefficient Matrix and Vector Forms of a Linear System Suppose we have a system of m linear equations in n unknowns a 11 x 1 + a 12 x 2 + + a 1n x n b 1

More information

Kevin James. MTHSC 3110 Section 2.2 Inverses of Matrices

Kevin James. MTHSC 3110 Section 2.2 Inverses of Matrices MTHSC 3110 Section 2.2 Inverses of Matrices Definition Suppose that T : R n R m is linear. We will say that T is invertible if for every b R m there is exactly one x R n so that T ( x) = b. Note If T is

More information

Chapter 2. Matrix Arithmetic. Chapter 2

Chapter 2. Matrix Arithmetic. Chapter 2 Matrix Arithmetic Matrix Addition and Subtraction Addition and subtraction act element-wise on matrices. In order for the addition/subtraction (A B) to be possible, the two matrices A and B must have the

More information

A primer on matrices

A primer on matrices A primer on matrices Stephen Boyd August 4, 2007 These notes describe the notation of matrices, the mechanics of matrix manipulation, and how to use matrices to formulate and solve sets of simultaneous

More information

Math 3C Lecture 20. John Douglas Moore

Math 3C Lecture 20. John Douglas Moore Math 3C Lecture 20 John Douglas Moore May 18, 2009 TENTATIVE FORMULA I Midterm I: 20% Midterm II: 20% Homework: 10% Quizzes: 10% Final: 40% TENTATIVE FORMULA II Higher of two midterms: 30% Homework: 10%

More information

EE263 Review Session 1

EE263 Review Session 1 EE263 Review Session 1 October 5, 2018 0.1 Importing Variables from a MALAB.m file If you are importing variables given in file vars.m, use the following code at the beginning of your script. close a l

More information

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Mathematical Operations with Arrays) Contents Getting Started Matrices Creating Arrays Linear equations Mathematical Operations with Arrays Using Script

More information

Chapter 1. Introduction to Vectors. Po-Ning Chen, Professor. Department of Electrical and Computer Engineering. National Chiao Tung University

Chapter 1. Introduction to Vectors. Po-Ning Chen, Professor. Department of Electrical and Computer Engineering. National Chiao Tung University Chapter 1 Introduction to Vectors Po-Ning Chen, Professor Department of Electrical and Computer Engineering National Chiao Tung University Hsin Chu, Taiwan 30010, R.O.C. Notes for this course 1-1 A few

More information

MAC Learning Objectives. Learning Objectives (Cont.) Module 10 System of Equations and Inequalities II

MAC Learning Objectives. Learning Objectives (Cont.) Module 10 System of Equations and Inequalities II MAC 1140 Module 10 System of Equations and Inequalities II Learning Objectives Upon completing this module, you should be able to 1. represent systems of linear equations with matrices. 2. transform a

More information

Basic Concepts in Matrix Algebra

Basic Concepts in Matrix Algebra Basic Concepts in Matrix Algebra An column array of p elements is called a vector of dimension p and is written as x p 1 = x 1 x 2. x p. The transpose of the column vector x p 1 is row vector x = [x 1

More information

STEP Support Programme. STEP 2 Matrices Topic Notes

STEP Support Programme. STEP 2 Matrices Topic Notes STEP Support Programme STEP 2 Matrices Topic Notes Definitions............................................. 2 Manipulating Matrices...................................... 3 Transformations.........................................

More information

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

Introduction. Vectors and Matrices. Vectors [1] Vectors [2] Introduction Vectors and Matrices Dr. TGI Fernando 1 2 Data is frequently arranged in arrays, that is, sets whose elements are indexed by one or more subscripts. Vector - one dimensional array Matrix -

More information

(1) for all (2) for all and all

(1) for all (2) for all and all 8. Linear mappings and matrices A mapping f from IR n to IR m is called linear if it fulfills the following two properties: (1) for all (2) for all and all Mappings of this sort appear frequently in the

More information

MA 575 Linear Models: Cedric E. Ginestet, Boston University Revision: Probability and Linear Algebra Week 1, Lecture 2

MA 575 Linear Models: Cedric E. Ginestet, Boston University Revision: Probability and Linear Algebra Week 1, Lecture 2 MA 575 Linear Models: Cedric E Ginestet, Boston University Revision: Probability and Linear Algebra Week 1, Lecture 2 1 Revision: Probability Theory 11 Random Variables A real-valued random variable is

More information

A Brief Introduction to Tensors

A Brief Introduction to Tensors A Brief Introduction to Tensors Jay R Walton Fall 2013 1 Preliminaries In general, a tensor is a multilinear transformation defined over an underlying finite dimensional vector space In this brief introduction,

More information

Arrays: Vectors and Matrices

Arrays: Vectors and Matrices Arrays: Vectors and Matrices Vectors Vectors are an efficient notational method for representing lists of numbers. They are equivalent to the arrays in the programming language "C. A typical vector might

More information

A Review of Matrix Analysis

A Review of Matrix Analysis Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value

More information

Appendix C Vector and matrix algebra

Appendix C Vector and matrix algebra Appendix C Vector and matrix algebra Concepts Scalars Vectors, rows and columns, matrices Adding and subtracting vectors and matrices Multiplying them by scalars Products of vectors and matrices, scalar

More information

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0. Matrices Operations Linear Algebra Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0 The rectangular array 1 2 1 4 3 4 2 6 1 3 2 1 in which the

More information

Chapter. Algebra techniques. Syllabus Content A Basic Mathematics 10% Basic algebraic techniques and the solution of equations.

Chapter. Algebra techniques. Syllabus Content A Basic Mathematics 10% Basic algebraic techniques and the solution of equations. Chapter 2 Algebra techniques Syllabus Content A Basic Mathematics 10% Basic algebraic techniques and the solution of equations. Page 1 2.1 What is algebra? In order to extend the usefulness of mathematical

More information

MATRICES The numbers or letters in any given matrix are called its entries or elements

MATRICES The numbers or letters in any given matrix are called its entries or elements MATRICES A matrix is defined as a rectangular array of numbers. Examples are: 1 2 4 a b 1 4 5 A : B : C 0 1 3 c b 1 6 2 2 5 8 The numbers or letters in any given matrix are called its entries or elements

More information

Section 9.2: Matrices.. a m1 a m2 a mn

Section 9.2: Matrices.. a m1 a m2 a mn Section 9.2: Matrices Definition: A matrix is a rectangular array of numbers: a 11 a 12 a 1n a 21 a 22 a 2n A =...... a m1 a m2 a mn In general, a ij denotes the (i, j) entry of A. That is, the entry in

More information

CHAPTER 6. Direct Methods for Solving Linear Systems

CHAPTER 6. Direct Methods for Solving Linear Systems CHAPTER 6 Direct Methods for Solving Linear Systems. Introduction A direct method for approximating the solution of a system of n linear equations in n unknowns is one that gives the exact solution to

More information

Advanced Digital Signal Processing -Introduction

Advanced Digital Signal Processing -Introduction Advanced Digital Signal Processing -Introduction LECTURE-2 1 AP9211- ADVANCED DIGITAL SIGNAL PROCESSING UNIT I DISCRETE RANDOM SIGNAL PROCESSING Discrete Random Processes- Ensemble Averages, Stationary

More information

Math 313 Chapter 1 Review

Math 313 Chapter 1 Review Math 313 Chapter 1 Review Howard Anton, 9th Edition May 2010 Do NOT write on me! Contents 1 1.1 Introduction to Systems of Linear Equations 2 2 1.2 Gaussian Elimination 3 3 1.3 Matrices and Matrix Operations

More information