


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Pseudo-code and pre-conditions for performing matrix operations, including addition, multiplication, transposition, and finding the inverse of a 3x3 matrix. The concept of cofactors and the determinant in the context of finding the inverse.
Typology: Slides
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Pre-conditions: two non-empty 3x3 matrices of integer/ real / complex type Post-conditions: a new 3x3 matrix of the same type with the elements added
Pseudo-code:
Suppose that A and B are two matrices and that A is an m x n matrix (m rows and n columns) and that B is a p x q matrix. To be able to multiply A and B together, A must have the same number of columns as B has rows (i.e., n=p). The product will be a matrix with m rows and q columns. To find the entry in row r and column c of the new matrix we take the "dot product" of row r of matrix A and column c of matrix B (pair up the elements of row r with column c, multiply these pairs together individually, and then add their products).
Mathematically, n C(I,J) = ∑ A(I,K) B(K,J) K=
Where I ranges from 1.. m J ranges from 1.. q K ranges from 1.. n = p
Pre-conditions: two non-empty 3x3 matrices of integer/ real / complex type Post-conditions: a new 3x3 matrix of the same type with the product of the matrices
Pseudo-code:
i. For J in 1.. 3 loop
Pre-conditions: A non-empty 3x3 matrix Post-conditions: A new 3x3 matrix of the same type with the elements in rows and columns exchanged
Pseudo-code:
The inverse of a 3×3 matrix is given by:
We use cofactors to determine the adjoint of a matrix.
The cofactor of an element in a matrix is the value obtained by evaluating the determinant formed by the elements not in that particular row or column.
We find the adjoint matrix by replacing each element in the matrix with its cofactor and applying a + or - sign as follows: �
Note: The method for computing the cofactor automatically generates the required signs in the cofactor matrix.