1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of.

Slides:



Advertisements
Similar presentations
Section 13-4: Matrix Multiplication
Advertisements

Numerical Algorithms ITCS 4/5145 Parallel Computing UNC-Charlotte, B. Wilkinson, 2009.
Numerical Algorithms Matrix multiplication
Parallel Programming: Techniques and Applications Using Networked Workstations and Parallel Computers Chapter 11: Numerical Algorithms Sec 11.2: Implementing.
Matrix Multiplication To Multiply matrix A by matrix B: Multiply corresponding entries and then add the resulting products (1)(-1)+ (2)(3) Multiply each.
Numerical Algorithms • Matrix multiplication
Maths for Computer Graphics
Design of parallel algorithms
1 Tuesday, October 31, 2006 “Data expands to fill the space available for storage.” -Parkinson’s Law.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Table of Contents Matrices - Multiplication Assume that matrix A is of order m  n and matrix B is of order p  q. To determine whether or not A can be.
100’s of free ppt’s from library
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Determinants 2 x 2 and 3 x 3 Matrices. Matrices A matrix is an array of numbers that are arranged in rows and columns. A matrix is “square” if it has.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
13.1 Matrices and Their Sums
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Numerical Algorithms Quiz questions ITCS4145/5145, Parallel Programming March 14, 2013.
Matrix Algebra Section 7.2. Review of order of matrices 2 rows, 3 columns Order is determined by: (# of rows) x (# of columns)
8.2 Operations With Matrices
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
MATRIX: A rectangular arrangement of numbers in rows and columns. The ORDER of a matrix is the number of the rows and columns. The ENTRIES are the numbers.
Warm Up Perform the indicated operations. If the matrix does not exist, write impossible
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
Systems of Equations and Matrices Review of Matrix Properties Mitchell.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
2.1 Matrix Operations 2. Matrix Algebra. j -th column i -th row Diagonal entries Diagonal matrix : a square matrix whose nondiagonal entries are zero.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Numerical Algorithms Chapter 11.
13.4 Product of Two Matrices
12-1 Organizing Data Using Matrices
Christmas Packets are due on Friday!!!
Matrix Operations Free powerpoints at
Matrix Operations.
Matrix Operations.
Matrix Operations Free powerpoints at
Matrix Multiplication
Matrix Operations Monday, August 06, 2018.
Matrix Operations.
Matrix Operations Free powerpoints at
Sequences and Summations
WarmUp 2-3 on your calculator or on paper..
Parallel Matrix Operations
Numerical Algorithms • Parallelizing matrix multiplication
2. Matrix Algebra 2.1 Matrix Operations.
Matrices Elements, Adding and Subtracting
Numerical Algorithms Quiz questions
MATRICES MATRIX OPERATIONS.
2.2 Introduction to Matrices
© B. Wilkinson/Clayton Ferner SIGCSE 2013 Workshop 31 session2a
CS100: Discrete structures
Matrix Addition
3.5 Perform Basic Matrix Operations
Determinants 2 x 2 and 3 x 3 Matrices.
Matrix Addition and Multiplication
Chapter 4 Matrices & Determinants
Determinants 2 x 2 and 3 x 3 Matrices.
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
1.8 Matrices.
Matrices and Determinants
Data Parallel Pattern 6c.1
1.8 Matrices.
Applied Discrete Mathematics Week 4: Functions
Presentation transcript:

1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of B as b i,j, each element of C computed as : Add A B C Easy to parallelize – each processor computes one C element or group of C elements

2 Matrix Multiplication, C = A * B Multiplication of two matrices, A and B, produces matrix C whose elements, c i,j (0 <= i < n, 0 <= j < m), computed as follows: where A is an n x l matrix and B is an l x m matrix.

3 Parallelizing Matrix Multiplication Assume throughout that matrices square (n x n matrices). Sequential code to compute A x B could simply be for (i = 0; i < n; i++) // for each row of A for (j = 0; j < n; j++) { // for each column of B c[i][j] = 0; for (k = 0; k < n; k++) c[i][j] = c[i][j] + a[i][k] * b[k][j]; } Requires n 3 multiplications and n 3 additions Sequential time complexity of O(n 3 ). Very easy to parallelize as each result independent