Hello. Here is a guide on matrix multiplication in the field of linear algebra.
Matrix multiplication is an operation similar to addition, subtraction, multiplication and division but it is for matrices.
Before we get into matrix multiplication, let’s review the dimensions of a matrix.
Update: The LaTeX parts are fixed in the later part of this page. The QuickLatex plugin did not work. It was fixed by using the QuickLaTeX website itself. From the website I copied and pasted the images.
Dimensions of Matrices
Suppose we have a matrix such as:
This matrix has 2 rows and 3 columns. Rows go from left to right and follow a horizontal fashion while columns are from top to bottom in a vertical manner. Since has 2 rows and 3 columns, we say that is a 2 by 3 matrix.
The first row of A contain the entries 8, 2 and 1 and the second row contains the entries of -1, -2 and 0.
With the columns, the first column of A has 8 and -1, the second column has 2 and -2 and the last column has 1 and 0.
Suppose we have a matrix B which is:
The matrix has 3 rows and 3 columns. Whenever a matrix has the same number of rows as it does the number of columns,we say that the matrix is a square matrix. In this case, B is a square matrix. In Linear Algebra, square matrices have a lot neat and special properties.
In regular multiplication, two numbers are needed to create an answer called the product. Two times three gives six for example.
Matrix multiplication does not operate exactly like regular multiplication but it does require two matrices under a certain condition to create an output.
Instead of showing the general formula, a simple example will be shown first.
Suppose we have which is a 1 by 2 matrix and a 2 by 2 matrix
We can matrix multiply the matrix with to create since the number of columns of matches the number of rows from the matrix which is 2.
Matrix multiplying to get is not possible as the number of columns in is 2 which does not match the one row in matrix .
The resulting matrix from matrix multiplication is a 1 by 2 matrix. The matrix has one row from the one row from and has 2 columns from the 2 columns of . The matrix is:
The first entry of the first row in is multiplied by the first entry in the first column of added by the second entry in the first row of multiplied by the second entry in the first column of . This gives the 6 as the first row, first column entry in .
To get the 3, we use the row from but use the second column from .
If the matrix has many rows and many columns and if the matrix has many rows and many columns then the matrix exists if . That is, the number of columns in is equal to the number of rows in .
The resulting matrix would have many rows and many columns.
The image from http://www.coolmath.com/sites/cmat/files/images/04-matrices-03.gif is provides a nice summary and guideline for matrix multiplication.
Given the matrices
If so, what is ? Does exist? If so, what is ?
The matrix is a 2 by 2 matrix and is a 2 by 1 matrix. The matrix does exist since the number of columns in matches the number of rows in which is 2.
Through matrix multiplication, is:
In this example we are given:
What is BA?
The matrix is a 3 by 3 matrix and is a 3 by 2 matrix. Matrix multiplication can be applied and would be a 3 by 2 matrix.
Matrix multiplication is used often when dealing with matrices. You first learn this topic by hand as an introduction.
When matrices get larger the use of computer software such as R, MATLAB, Python, C, C++ would be preferred.
Given matrices and the command for matrix multiplication in the statistical program R is
A %*% B
The featured image is from http://d1gjlxt8vb0knt.cloudfront.net//wp-content/uploads/strassen_new.png.