EGR 102
Lecture 3
1
EGR 102
Introduction to
Engineering Modeling
Matrix Math
Chapter 8.1
Gauss Elimination
Chapter 9.1.1, 9.1.3, 9.2 & 9.3
Figures from: “Applied Numerical Methods with MATLAB,” Steven Chapra, McGraw Hill
EGR 102
Lecture 3
2
MATLAB: Matrix Laboratory
Images, movies, sound and variables
–
all are matrices in MATLAB
Sound:
load chirp
sound(y)
Image:
load clown
image(X), colormap(map)
Animations (movies):
z = peaks; surf(z); axis tight
set(gca,'nextplot','replacechildren');
for j = 1:20
surf(sin(2*pi*j/20)*z,z)
f(j) = getframe;
end
movie(f,50)

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
EGR 102
Lecture 3
3
MATLAB
MATLAB is both a software tool and a
MATLAB is both a software tool and a
computer language.
A variety of numerical functions, symbolic
computations, and visualization tools have
been added to the matrix manipulations.
Other languages & libraries include:
FORTRAN (IMSL), C++,
FORTRAN (IMSL), C++,…
EGR 102
Lecture 3
4
Numerical Methods …
•
Solving a system of algebraic equations / inverting
matrices
•
Finding roots of equations
•
Solving matrices (linear algebra)
•
Regression / Curve-fitting
•
Numerical Integration
•
Solving ODE’s (Ordinary Differential Equations)
•
More advanced topics ( e.g., solving PDEs) …

EGR 102
Lecture 3
5
Finite Element Analysis
Millions of
simultaneous
equations
EGR 102
Lecture 3
6
Matrix Math Review
Matrices used to:
Describe linear equations
Track coefficients of linear transformations
Record data that depend on multiple parameters
Matrices can be added, multiplied, and
decomposed in various ways

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
EGR 102
Lecture 3
7
Matrix Math Review
The horizontal lines in a matrix are called
rows
The vertical lines are called
columns
.
A matrix with
m
rows &
n
columns is called an
m
-by-
n
matrix
m
and
n
are called its
dimensions
.
The dimensions of a matrix are always given with the number of rows
first, then the number of columns.
It is commonly said that an
m
-by-
n
matrix has an
order
(size) of
m
×
n
.
⎪
⎭
⎪
⎬
⎫
⎪
⎩
⎪
⎨
⎧
=
12
11
10
9
8
7
6
5
4
3
2
1
A
EGR 102
Lecture 3
8
Matrix Math Review
Almost always capital letters denote matrices with the corresponding
lower-case letters with two indices representing the entries.
For example, the entry of a matrix
A
that lies in the
i
-th row and the
j
-th
column is written as
a
i,j
and called the
i,j
entry or
(i,j)
-th entry of
A
.
Alternative notations for that entry are
A
[
i,j
] or
A
i,j
.
The row is always
noted first, then the column.
⎪
⎭
⎪
⎬
⎫
⎪
⎩
⎪
⎨
⎧
=
12
11
10
9
8
7
6
5
4
3
2
1
A
a
2,3
= ?