Math Calculators, Lessons and Formulas

It is time to solve your math problem

« Matrices Definitions
Linear Algebra - Matrices: (lesson 2 of 3)

Matrix Addition and Multiplication

Addition of Matrices

Denote the sum of two matrices A and B (of the same dimensions) by C = A + B.. The sum is defined by adding entries with the same indices

Addition and Subtraction

over all i and j.

Example:

Addition and Subtraction example

Subtraction of Matrices

Subtraction is performed in analogous way.

Example:

Addition and Subtraction example

Scalar multiplication

To multiply a matrix with a real number, we multiply each element with this number.

Example:

Scalar multiplication

Multiplication of a row vector by a column vector

This multiplication is only possible if the row vector and the column vector have the same number of elements. To multiply the row by the column, one multiplies corresponding elements, then adds the results.

Example:

Multiplication of a row matrix

If the row vector and the column vector are not of the same length, their product is not defined.

Example:

Multiplication of a row matrix

The Product of a Row Vector and Matrix

When the number of elements in row vector is the same as the number of rows in the second matrix then this matrix multiplication can be performed.

Example:

Product of a Row Vector and Matrix

If the number of elements in row vector is NOT the same as the number of rows in the second matrix then their product is not defined.

Example:

Product of a Row Vector and Matrix

Matrix Multiplication - General Case

When the number of columns of the first matrix is the same as the number of rows in the second matrix then matrix multiplication can be performed.

Examples

Multiplying a 2 x 3 matrix by a 3 x 2 matrix is possible and it gives a 2 x 2 matrix as the result.

Matrix Multiplication - General Case

Multiplying a 2 x 3 matrix by a 2 x 3 matrix is not defined.

Matrix Multiplication - General Case

Here is an example of matrix multiplication for two concrete matrices

Example: Find the product AB where A and B are matrices given by:

Matrix Multiplication - General Case

Solution:

The product AB is defined since A is a 2 x 3 matrix and B is a 3 x 2 matrix. The answer is a 2 x 2 matrix. The multiplication is divided into 4 steps.

Step 1:

We multiply the 1st row of the first matrix and 1st column of the second matrix, element by element. The answer goes in position (1, 1)

Matrix Multiplication - Step 1

Step 2:

Now, we multiply the 1st row of the first matrix and 2nd column of the second matrix. The answer goes in position (1, 2)

Matrix Multiplication - Step 2

Step 3:

Now we multiply 2nd row of the first matrix and the 1st column of the second matrix. The answer goes in position (2, 1)

Matrix Multiplication - Step 3

Step 4:

Finally, we multiply 2nd row of the first matrix and the 2st column of the second matrix. The answer goes in position (2, 2)

Matrix Multiplication - Step 4

So, the result is:

Matrix Multiplication - result

Example 2: Find the product AB where A and B are matrices given by:

Matrix Multiplication - Example 2

Solution:

Matrix Multiplication - Example 2