Matrix Algebra: Addition, Subtraction, and Multiplication
Matrix algebra involves performing arithmetic operations on matrices. Matrices are arrays of numbers arranged in rows and columns, and these operations are fundamental in many fields such as linear algebra, computer science, physics, and economics. Let's go through the basic matrix operations: addition, subtraction, and multiplication.
1. Matrix Addition
Matrix addition involves adding two matrices of the same dimensions by adding their corresponding elements.
Conditions for Addition
- Two matrices can only be added if they have the same dimensions. This means both matrices must have the same number of rows and the same number of columns.
Procedure for Addition
-
If A=[aij] and B=[bij] are two matrices, their sum C=A+B is given by adding corresponding elements:
C=A+B=[aij+bij]
Where aij is the element in the i-th row and j-th column of matrix A, and bij is the element in the i-th row and j-th column of matrix B.
Example of Matrix Addition
Let matrix A and matrix B be:
A=(1324),B=(5768)
To add these matrices:
A+B=(1+53+72+64+8)=(610812)
2. Matrix Subtraction
Matrix subtraction is similar to matrix addition. You subtract corresponding elements of two matrices of the same dimensions.
Conditions for Subtraction
- Like addition, matrix subtraction can only be performed when the two matrices have the same dimensions.
Procedure for Subtraction
-
If A=[aij] and B=[bij], their difference C=A−B is given by subtracting corresponding elements:
C=A−B=[aij−bij]
Where aij and bij are the corresponding elements in matrices A and B, respectively.
Example of Matrix Subtraction
Let matrix A and matrix B be:
A=(3546),B=(1324)
To subtract B from A:
A−B=(3−15−34−26−4)=(2222)
3. Matrix Multiplication
Matrix multiplication is a bit more involved than addition and subtraction. To multiply two matrices, the number of columns in the first matrix must equal the number of rows in the second matrix.
Conditions for Multiplication
- If matrix A is of size m×n (i.e., A has m rows and n columns), and matrix B is of size n×p (i.e., B has n rows and p columns), the product AB will be a new matrix of size m×p.
Procedure for Multiplication
-
To find the element cij in the product matrix C=AB, take the dot product of the i-th row of matrix A with the j-th column of matrix B.
cij=k=1∑naik⋅bkj
This means that for each element cij, you multiply each corresponding element of the i-th row of A and the j-th column of B, then sum the results.
Example of Matrix Multiplication
Let matrix A and matrix B be:
A=(1324),B=(5768)
The product AB will be a 2x2 matrix. To calculate each element of AB:
- c11=(1×5)+(2×7)=5+14=19
- c12=(1×6)+(2×8)=6+16=22
- c21=(3×5)+(4×7)=15+28=43
- c22=(3×6)+(4×8)=18+32=50
So, the product AB is:
AB=(19432250)
Important Properties of Matrix Operations
-
Commutativity:
- Addition: Matrix addition is commutative, meaning A+B=B+A.
- Multiplication: Matrix multiplication is not commutative in general, meaning AB=BA.
-
Associativity:
- Both addition and multiplication are associative. For example:
- (A+B)+C=A+(B+C)
- (AB)C=A(BC)
-
Distributivity:
- Matrix multiplication distributes over addition. That is:
- A(B+C)=AB+AC
- (A+B)C=AC+BC
-
Identity Matrices:
- There exists an identity matrix I for matrix multiplication such that for any matrix A, AI=A and IA=A. For a matrix A of size m×n, the identity matrix I is of size n×n (square matrix).
-
Zero Matrix:
- A zero matrix (matrix where all elements are zero) serves as the identity element for matrix addition. For any matrix A, A+0=A.
Conclusion
Matrix algebra is a crucial aspect of linear algebra, with operations like addition, subtraction, and multiplication serving as the foundation for more complex matrix manipulations. The key rules to remember are the conditions for each operation (dimensions, associativity, distributivity) and how the operations are performed (adding/subtracting corresponding elements, multiplying using dot products). Understanding these basics will help you work with matrices in various mathematical and practical applications.