Matrices - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Matrices

Description:

An array of mathematical elements subject to certain algebraic laws and used ... Row Reduced Echelon Form. Multiplication. Transpose. Determinant. Inverse ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 22
Provided by: andre225
Category:
Tags: echelon | matrices

less

Transcript and Presenter's Notes

Title: Matrices


1
Matrices
  • Data StructuresECE/CS 268
  • Andrew Rupp

2
Outline
  • Definition
  • Matrix Manipulations
  • Binary Matrices
  • Sparse Matrices/Vectors
  • Noninteger Keys
  • Examples
  • References

3
Definition
  • A two dimensional array of elements
  • Array of numbers or a table of variables
  • An array of mathematical elements subject to
    certain algebraic laws and used notably to
    express the conditions in which a system of
    linear equations has a solution.

4
Matrix Manipulations
  • Gauss-Jordan Elimination
  • Row Reduced Echelon Form
  • Multiplication
  • Transpose
  • Determinant
  • Inverse

5
Gauss-Jordan
6
Row Reduced Echelon Form
  • If a row has nonzero entries, then the first
    nonzero entry is 1, called the leading 1 in this
    row.
  • If a column contains a leading 1, then all the
    other entries in that column are zero.
  • If a row contains a leading 1, then each row
    above contains a leading 1 further to the left.

I
7
Multiplication
  • The number of columns in the 1st Matrix must be
    equal to the number of rows in the 2nd Matrix
  • Pouring rows of A down the columns of B

If A is m x p and B is p x n, then the product AB
must be m x n.
8
Multiplication
9
Determinant
10
Transpose
  • Put the values from the columns into rows

11
Inverse
  • A-1adj A / det A

12
Properties
  • Noncommutative
  • ABBA
  • There are exceptions AIIAA
  • Associative
  • (AB)CA(BC)
  • Distributive -
  • A(CD)ACAD
  • (AB)CACBC

13
Matrices in Java
  • Defining A Matrix
  • double d new double34
  • String word new String93
  • double price
  • 1.25,1.09,0.58,0.25
  • 1.35,0.98,0.62,0.35
  • 1.40,1.12,0.43,0.19

14
Matrices in Java
  • We think matrices are stored in memory the way we
    write a matrix on paper however the matrix is
    stored in a line.

15
Binary/Bit Matrix
  • A binary/bit matrix is a matrix that holds 0/1,
    true/false, or yes/no.
  • This uses less memory than a regular matrix.

16
Sparse Matrices/Vectors
  • Matrix or a Vector that most values are null or
    0.
  • The values that are not 0 are the only values
    stored.

17
Noninteger Keys
  • Can store a map in matrix form using the
    MapMatrix constructor
  • MapMatrix()
  • MapMatrix(Object d)
  • Methods
  • Get(Object key1,Object key 2)-
  • returns an Object
  • set(Object key1, Object key2, Object2)

18
Examples
  • Memory Game from Programming 2 with Bitterman
  • Cards cnew Cards66

19
Examples
  • Rain Game
  • The Game of Life

20
Summary
  • Matrices occur in a number of mathematical
    problems.
  • Java provides a primitive matrix facility like
    the array data type.
  • Sparse Matrix is a way to conserve space.
  • A matrix can be a map of maps like the MapMatrix
    constructor.
  • Bit Matrix is a way to store 1/0s using a lot
    less memory.

21
References
  • Signals and Systems Continuous and Discrete
  • Elementary Differential Equations Fourth Edition
  • Linear Algebra with Applications
  • Classic Data Structures in Java
  • New Webster Dictionary and Thesaurus
  • Wade Apels Memory Game
Write a Comment
User Comments (0)
About PowerShow.com