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.

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
CSE5304—Project Proposal Parallel Matrix Multiplication Tian Mi.
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
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
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.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Matlab Basics Introduction to Matlab: Matrix Operations.
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
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
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
Af2. The Queen Mother says “ Please be quite and let Patrick give the lecture. Thank you.”
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.
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.
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.
Numerical Algorithms Chapter 11.
CSE 504 Discrete Mathematics & Foundations of Computer Science
CSNB 143 Discrete Mathematical Structures
13.4 Product of Two Matrices
4.5 Matrices.
Properties and Applications of Matrices
12-1 Organizing Data Using Matrices
Christmas Packets are due on Friday!!!
Matrix Operations Free powerpoints at
Matrix Operations.
Discrete Structures – CNS2300
4.6 Matrices.
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
Parallel Matrix Operations
Numerical Algorithms • Parallelizing matrix multiplication
2. Matrix Algebra 2.1 Matrix Operations.
Matrices Elements, Adding and Subtracting
Parallel Programming in C with MPI and OpenMP
Numerical Algorithms Quiz questions
MATRICES MATRIX OPERATIONS.
Section 2.4 Matrices.
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
Matrix Addition and Multiplication
1.8 Matrices.
Matrices and Determinants
Data Parallel Pattern 6c.1
1.8 Matrices.
Applied Discrete Mathematics Week 4: Functions
Matrices and Determinants
Presentation transcript:

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 bi,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

Matrix Multiplication, C = A * B Multiplication of two matrices, A and B, produces matrix C whose elements, ci,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.

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 n3 multiplications and n3 additions Sequential time complexity of O(n3). Very easy to parallelize as each result independent