-
Notifications
You must be signed in to change notification settings - Fork 0
Matrix Operations
Matrix operations include the arithmetic operations of addition, subtraction, multiplication of matrices. Also, we can find the transpose and inverse of a matrix, which can also be included as operations on matrices. The matrix operations help in combining two or more matrices into a single matrix.
The arithmetic operations of addition, subtraction, multiplication can also be performed on matrices.
Matrix addition is an operation performed on two matrices with the same dimensions, where each corresponding element in the matrices is added together to form a new matrix. The resulting matrix will have the same dimensions as the original matrices.
Formula of Matrix Addition:
Example:
The resulting matrix will have the same dimensions as the matrices operands. The matrices can only performs the matrix addition, if and only if the order or dimensions (the number of rows and columns) of the matrices are equal. The addition for matrices with different sizes are not defined.
If
If the three matrices
There is an identity element for every matrix of size
If
Consequently, a zero matrix is produced by adding a matrix and its additive inverse.
Similar to addition, two matrices can be subtracted if they have the same dimensions, and its also have the same properties with the matrix addition.
Subtraction is performed by subtracting the corresponding elements of the matrices.
Formula of Matrix Subtraction:
Note
(
In other words, that matrix subtraction is an addition of the inverse of a matrix to the given matrix.
Example:
The matrix subtraction has the same properties with matrix addition.
- Closure Property
- Commutative Property
- Associative Property
- Additive Identity
- Additive Inverse
Matrix multiplication follows certain properties and there are different types of multiplication based on the dimensions of the matrices involved. In terms of the numbers of matrices involved, there are two main types of matrix multiplication.
This type involves multiplying each element of matrix by a scalar (a single number). When a matrix is multiplied by a scalar (a single number), each element of the matrix is multiplied by that scalar. The resulting matrix has the same dimensions as the original matrix.
Note
The matrix denoted by
Scalar multiplication exhibits closure property, which means that when a matrix
The associative property states that when a scalar
It's equivalent to first multiplying the scalar
For example, let's consider the matrix
If we multiply
The resulting matrices are equal, demonstrating the associative property.
The distributive property states that when a scalar
Example:
Let's consider matrices
$A$ and$B$ .$$A = \begin{bmatrix} 2 & 4 \\\ 1 & 3 \end{bmatrix}_{2 \times 2} \qquad B = \begin{bmatrix} 5 & 2 \\\ 0 & -1 \end{bmatrix}_{2 \times 2}$$ If we multiply
$A$ and$B$ by scalar$c = 2$ , we can evaluate the following expressions:Using formula
$c(A +B)$ :$$\boxed{c \left(A + B \right) = 2 \left(A + B \right)}$$
$$ \Downarrow $$ $$2 \left( \begin{bmatrix} 2 & 4 \\\ 1 & 3 \end{bmatrix} + \begin{bmatrix} 5 & 2 \\\ 0 & -1 \end{bmatrix} \right) = 2 \begin{bmatrix} 7 & 6 \\\ 1 & 2 \end{bmatrix}_{2 \times 2}$$ $$2 \begin{bmatrix} 7 & 6 \\\ 1 & 2 \end{bmatrix}_{2 \times 2} = \begin{bmatrix} 14 & 12 \\\ 2 & 4 \end{bmatrix}_{2 \times 2}$$
$$ \Downarrow $$ $$2(A + B) = \begin{bmatrix} 14 & 12 \\\ 2 & 4 \end{bmatrix}_{2 \times 2}$$
Using formula
$cA + cB$ :$$\boxed{cA + cB = 2A + 2B}$$
$$ \Downarrow $$ $$2A = 2 \begin{bmatrix} 2 & 4 \\\ 1 & 3 \end{bmatrix}_{2 \times 2} = \begin{bmatrix} 4 & 8 \\\ 2 & 6 \end{bmatrix}_{2 \times 2}$$ $$2B = 2 \begin{bmatrix} 5 & 2 \\\ 0 & -1 \end{bmatrix}_{2 \times 2} = \begin{bmatrix} 10 & 4 \\\ 0 & -2 \end{bmatrix}_{2 \times 2}$$ $$\begin{bmatrix} 4 & 8 \\\ 2 & 6 \end{bmatrix}_{2 \times 2} + \; \begin{bmatrix} 10 & 4 \\\ 0 & -2 \end{bmatrix}_{2 \times 2} = \begin{bmatrix} 14 & 12 \\\ 2 & 4 \end{bmatrix}_{2 \times 2}$$
$$ \Downarrow $$ $$2A + 2B = \begin{bmatrix} 14 & 12 \\\ 2 & 4 \end{bmatrix}_{2 \times 2}$$ The resulting matrices are equal, demonstrating the distributive property.
Similarly, when two scalars
Example:
Let's consider the matrix
$M$ with dimensions$2 \times 3$ .$$M = \begin{bmatrix} 8 & -2 & 4 \\\ 7 & 1 & -8 \end{bmatrix}_{2 \times 3}$$ If we multiply by the sum of two scalars
$c$ and$d$ , with$c = 4$ and$d = 2$ , we can evaluate the following expressions:Using formula
$(c + d)A$ :$$\boxed{(c + d)A = (4 + 2)M}$$
$$ \Downarrow $$ $$(4 + 2)M = 6M \implies 6 \begin{bmatrix} 8 & -2 & 4 \\\ 7 & 1 & -8 \end{bmatrix}_{2 \times 3}$$ $$6 \begin{bmatrix} 8 & -2 & 4 \\\ 7 & 1 & -8 \end{bmatrix}_{2 \times 3} = \begin{bmatrix} 48 & -12 & 24 \\\ 42 & 6 & -48 \end{bmatrix}_{2 \times 3}$$
$$ \Downarrow $$ $$(4 + 2)M = \begin{bmatrix} 48 & -12 & 24 \\\ 42 & 6 & -48 \end{bmatrix}_{2 \times 3}$$
Using formula
$cA + dA$ :$$\boxed{cA + dA = 4M + 2M}$$
$$ \Downarrow $$ $$4M = 4 \begin{bmatrix} 8 & -2 & 4 \\\ 7 & 1 & -8 \end{bmatrix}_{2 \times 3} = \begin{bmatrix} 32 & -8 & 16 \\\ 28 & 4 & -32 \end{bmatrix}_{2 \times 3}$$ $$2M = 2 \begin{bmatrix} 8 & -2 & 4 \\\ 7 & 1 & -8 \end{bmatrix}_{2 \times 3} = \begin{bmatrix} 16 & -4 & 8 \\\ 14 & 2 & -16 \end{bmatrix}_{2 \times 3}$$
$$ \Downarrow $$ $$4M + 2M = \begin{bmatrix} 48 & -12 & 24 \\\ 42 & 6 & -48 \end{bmatrix}_{2 \times 3}$$ The resulting matrices are equal, demonstrating the distributive property.
The multiplicative identity in matrix operations refers to the identity matrix, which, when multiplied by any compatible matrix, leaves the original matrix unchanged. In the context of linear algebra, this concept ensures that multiplying a matrix by the identity matrix yields the matrix itself, preserving its values.
The multiplicative zero property in matrix operations refers to the result of multiplying any matrix by a zero matrix, which yields a zero matrix of the same dimensions. This property is analogous to the zero property in scalar multiplication, ensuring that multiplying by zero annuls the values in the matrix.
Matrix multiplication is an operation performed on two matrices, where the elements of one matrix are multiplied by the corresponding elements of the other matrix and then summed up to obtain the resulting matrix.
This type involves multiplying two matrices together. It is more complex operation that combines the rows of the first matrix with the columns of the second matrix.
The resulting matrix has dimensions (
Please note the matrix multiplication is not commutative, which means the order of multiplication matters. That is, for matrices
There are also special cases where
Matrix multiplication follows several important properties that distinguish it from scalar multiplication. These properties are essential in understanding the behavior of matrices in linear algebra.
Matrix multiplication is associative, meaning that for three matrices
Example:
Let:
First, compute
Now, compute
Matrix multiplication is distributive over matrix addition. This means:
Example:
Using matrices
Now, calculate both sides of the distributive property equation to verify.
Matrix multiplication is not commutative. That is, for matrices
Example:
Using the matrices
Now calculate
For any square matrix
The identity matrix does not change the matrix it multiplies.
Example:
Let:
Multiplying
Multiplying any matrix by a zero matrix results in a zero matrix.
Example:
Let:
Multiplying
The transpose of a matrix is obtained by changing the rows into columns and columns into rows for a given matrix. Which means it switches row and column indices of the matrix by producing another matrix, and the transposed matrix is often denoted by
Note
💡 Tip: Repeating the process to transposed matrix will reset their elements position to original position.
And it can be denoted by
In the example above, the rows and columns indices of matrix
For any questions or feedback about this wiki, please reach out to the project maintainer(s) or create a new issue.
- Ryuu Mitsuki (Author)
This project is licensed under the Apache License 2.0. Please review the license file for more details.
- JMatrix v1.3.0 (Latest)
- JMatrix v1.2.0
- JMatrix v1.1.0
- JMatrix v1.0.0
- JMatrix v0.2.0 (Outdated)
- JMatrix v0.1.0 (Outdated)