Math. 375, Fall 2005 2. Matrices and Vectors - PowerPoint PPT Presentation

About This Presentation
Title:

Math. 375, Fall 2005 2. Matrices and Vectors

Description:

vanishing of the determinant of a square matrix implies that its columns (or ... load gatlin, image(X);colormap(map),... bar3(A) demo: graphs & matrices, intro ... – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 17
Provided by: vagelic
Category:
Tags: fall | map | math | matrices | of | square | times | vectors

less

Transcript and Presenter's Notes

Title: Math. 375, Fall 2005 2. Matrices and Vectors


1
Math. 375, Fall 20052. Matrices and Vectors
  • Vageli Coutsias

2
Square matrix size nXn
A 1, 2, 3 4, 5, 6 Rectangular matrix,
size 2X3
3
Concepts from Linear Algebra
  • Eigenvalues and Eigenvectors
  • eig(A)
  • Solution of Linear Systems
  • x A/b
  • Linear Independence
  • Determinants
  • d det(A)
  • Matrix Inverse
  • B inv(A)

4
Special Matrices and Commands
  • Identity E eye(n)
  • Zero matrix zeros(m,n)
  • Inverse inv(A)
  • Matrix sum AB (both must be mXn)
  • Matrix product C AB
  • (A is mXk, B is kXn and C is mXn)
  • Dimensions size(A) (m,n)
  • Determinant det(A)

5
Banded Matrices script tridiag A 0 1 2
3 -1 0 1 2 -2 -1 0 1 -3 -2 -1
0 -4 -3 -2 -1 vdiag(A,-1) Cdiag(v,3) B1
tril(A,1) B2 triu(A,-1) T1 -triu(tril(ones(6,6)
,1),-1)3eye(6,6) T2 -diag(ones(5,1),-1)diag(on
es(6,1),0) -diag(ones(5,1),1) T3
toeplitz(2-1zeros(4,1))
6
Permutations
  • Permutation matrices left multiplication
    permutes rows (right multiplication permutes
    columns)

7
Determinants and linear dependence
  • vanishing of the determinant of a square matrix
    implies that its columns (or rows) are linearly
    dependent

8
Matrix displays
  • spy(A)
  • image(A)
  • mesh(A)
  • pltmat(A,name,colormap,font)
  • load gatlin, image(X)colormap(map),
  • bar3(A)
  • gtgtdemo graphs matrices, intro
  • whos shows workspace

9
Arrays vectors
x is a column vector while its transpose, x, is
a row vector
10
Basic vector/matrix operations
Inner product uv dot(u,v) sum0 for
i1length(u) sum sumu(i)v(i) end  
 
11
Outer Product uv for i1length(u) for
j1length(v) uv(i,j) u(i)v(j)
end end
   
12
Pointwise operations
13
1xN row X Nx4 matrix
1x4 row
1
 
Nx4 matrix X 4x1 column Nx1 column
14
 
Matrix-Vector multiplication The ROW picture
15
Matrix-Vector Multiplication The COLUMN picture
 
                              ?
 
16
II.VECTOR OPERATIONS (1) vector scale, add,
subtract (scalarvector) 210 20 30
20 40 60 (2) POINTWISE vector multiply,
divide, exponentiate (pointwise vector
vector) 2 3 4.10 20 30 20 60 120
(for pointwise operations, dimensions must
be identical!) (3) Vector linear combos
matrixvector, Ax (4) size(A) gives array
dimensions (array, can be used to index
other arrays) length(x) gives vector
dimension (5) for k 1n (operations)
end (loop around n times)
Write a Comment
User Comments (0)
About PowerShow.com