Difference between revisions of "Matrix Algebra and Matrix Multiplication"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
Line 72: Line 72:
  
 
===Multiplying matrices===
 
===Multiplying matrices===
Matrix multiplication is not commutative; that is, for most matrices <math> A </math> and <math> B </math>, <math> AB \neq BA </math>. Two matrices can only be multiplied together if the number of columns in the first matrix equals the number of rows in the second matrix. For example, we can take the product of a 3-by-2 matrix times a 2-by-5 matrix, but not a 3-by-2 matrix times a 3-by-2 matrix.
+
Matrix multiplication is not commutative; that is, for most matrices <math> A </math> and <math> B </math>, <math> AB \neq BA </math>. Two matrices can only be multiplied together if the number of columns in the first matrix equals the number of rows in the second matrix. For example, we can take the product of a 3-by-2 matrix times a 2-by-5 matrix, but not a 3-by-2 matrix times a 3-by-2 matrix. The product of two matrices has the same number of rows as the first matrix and the same number of columns as the second matrix. For example, a 2-by-3 matrix times a 3-by-2 matrix will result in a 2-by-2 matrix.
  
 +
The product of two 3-by-3 matrices is
 
<math>\begin{bmatrix}
 
<math>\begin{bmatrix}
 
a_{11} & a_{12} & a_{13}\\
 
a_{11} & a_{12} & a_{13}\\
Line 90: Line 91:
 
\end{bmatrix}
 
\end{bmatrix}
 
</math>
 
</math>
 +
 +
where c_{ij} is the dot product of the i-th row of the first matrix and the j-th column of the second matrix; that is, c_{ij} = a_{i1}b_{1j} & a_{i2}b_{2j} & a_{i3}b_{3j}.
  
 
==Resources==
 
==Resources==

Revision as of 11:49, 17 September 2021

Matrix Operations

Adding and subtracting matrices

In order to add or subtract two matrices, they must be of the same dimension; that is, the two matrices must have the same number of rows and the same number of columns. To add two matrices together, we simply need to add every entry in one matrix to the entry in the same row and same column in the other matrix. For example:


Multiplying matrices by scalars

When multiplying a matrix by a scalar (or number), all we need to do is multiply each entry of the matrix by the scalar. For example:


Multiplying matrices

Matrix multiplication is not commutative; that is, for most matrices and , . Two matrices can only be multiplied together if the number of columns in the first matrix equals the number of rows in the second matrix. For example, we can take the product of a 3-by-2 matrix times a 2-by-5 matrix, but not a 3-by-2 matrix times a 3-by-2 matrix. The product of two matrices has the same number of rows as the first matrix and the same number of columns as the second matrix. For example, a 2-by-3 matrix times a 3-by-2 matrix will result in a 2-by-2 matrix.

The product of two 3-by-3 matrices is

where c_{ij} is the dot product of the i-th row of the first matrix and the j-th column of the second matrix; that is, c_{ij} = a_{i1}b_{1j} & a_{i2}b_{2j} & a_{i3}b_{3j}.

Resources