Topics in this sectionMatrices4 topics
A matrix is a rectangular arrangement of numbers in rows and columns. We write matrices inside brackets, and we describe a matrix by its order — the number of rows followed by the number of columns. For example, a matrix with 2 rows and 3 columns is a 2×3 matrix. Matrices help us organize and calculate with groups of numbers at the same time, which is useful in many real situations.
Two matrices can be added or subtracted only when they have the same order — that is, the same number of rows and the same number of columns. To add or subtract, we simply add or subtract the numbers in matching positions.
Example: At a boma market in Juba, a trader recorded the number of bags of sorghum and dura sold over two days:
Day 1=(128),Day 2=(1511)To find the total sales over both days, we add the matrices:
Total=(128)+(1511)=(12+158+11)=(2719)The trader sold 27 bags of sorghum and 19 bags of dura in total.
For subtraction, suppose we want to find how many more items were sold on Day 2 than Day 1:
(1511)−(128)=(15−1211−8)=(33)Sometimes we need to multiply a whole matrix by a single number. This single number is called a scalar. Scalar multiplication means multiplying every entry in the matrix by that number.
Example: A county school has four classes with the following number of students organized in a row matrix:
(30352832)If each class gains 5 new students through a program, we multiply the matrix by the scalar 5 and then add:
(30352832)+5×(1111)=(30+535+528+532+5)=(35403337)Alternatively, we can distribute the scalar first:
(30352832)+(5555)=(35403337)The scalar can also multiply directly:
5×(30352832)=(150175140160)This would represent, for example, the total number of exercise books needed if each student requires 5 books.
Matrix multiplication is different from 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. If matrix A is m×n and matrix B is n×p, the product will be m×p.
We calculate each entry in the result by multiplying across rows of the first matrix with columns of the second matrix and adding the products — this is called the dot product.
Example: A shop in Wau sells two types of baskets (woven and plastic) at two locations (Town A and Town B). The prices in SSP are given by matrix P, and the quantities sold at each location are given by matrix Q:
P=(500300)(price of woven basket, price of plastic basket) Q=(20251510)The rows of Q represent Town A and Town B. The columns represent woven baskets and plastic baskets. To find the total revenue from each town, we multiply P × Q:
P×Q=(500300)×(20251510)For the first town (Town A):
(500×20)+(300×25)=10,000+7,500=17,500 SSPFor the second town (Town B):
(500×15)+(300×10)=7,500+3,000=10,500 SSPSo the revenue matrix is:
(17,50010,500)The identity matrix is a special square matrix with 1s along the main diagonal and 0s everywhere else. It acts like the number 1 in regular multiplication — multiplying any matrix by the identity matrix (of the correct size) leaves the original matrix unchanged.
The 2×2 identity matrix is:
I2=(1001)The 3×3 identity matrix is:
I3=100010001Example:
(3142)×(1001)=(3×1+4×01×1+2×03×0+4×11×0+2×1)=(3142)The matrix is unchanged after multiplication by the identity matrix.
- Addition and subtraction: Matrices must have the same order. Add or subtract corresponding entries.
- Scalar multiplication: Multiply every entry in the matrix by the scalar.
- Matrix multiplication: The number of columns in the first matrix must match the number of rows in the second. Multiply rows by columns and sum.
- Identity matrix: A square matrix with 1s on the main diagonal and 0s elsewhere; multiplying by the identity leaves the original matrix unchanged.
Traders in markets across Juba, Wau, and Malakal use matrix operations to track inventory and calculate profits. For example, a wholesale shop might record the quantity and price of sorghum, dura, and groundnuts in a matrix, then multiply by a matrix of weekly sales to find total revenue. Farmers can use matrix addition to combine harvests from different bomas, and businesses use scalar multiplication to calculate wages when each worker receives the same bonus.
Question
Two matrices can be added or subtracted only when they satisfy which condition?
Sign in to submit your answer and have it count toward your mastery.
Sign in to practiceTutor
Stuck? Ask me anything about this topic.
Sign in to ask the Sonza AI Tutor about this question.
Sign in to askDiscussions
No questions yet