A matrix organises entries by row and column
A matrix is a rectangular array of numbers or expressions. Its order is rows × columns. A matrix with two rows and three columns is 2 × 3, not 3 × 2. In the notation aᵢⱼ, the first index identifies the row and the second identifies the column. Matrices can record prices, quantities or transformations, but the meaning of each row and column must be stated. Equal matrices have the same order and equal corresponding entries; merely having the same collection of numbers is insufficient.
A row matrix has one row, a column matrix one column, and a square matrix has equal row and column counts. A zero matrix contains zeros throughout. A square diagonal matrix has zeros off its main diagonal. The identity matrix I has ones on the main diagonal and zeros elsewhere. Its order must match the multiplication: for a 2 × 2 matrix. Square brackets and row breaks make these structures clearer than an unlabelled list.
Add matrices and multiply by scalars
Addition and subtraction require equal orders because corresponding entries combine. With and. A scalar multiplies every entry. A negative scalar changes every sign as appropriate. If 2A − B is requested, perform both operations entry by entry. Do not confuse scalar multiplication with the row-by-column rule used to multiply two matrices.
Transpose Aᵀ interchanges rows and columns. If, then Aᵀ = [[1, 4], [2, 5], [3, 6]], changing order from 2 × 3 to 3 × 2. A symmetric matrix equals its transpose and must be square. Transposition is useful for checking a matrix's orientation, but it is not the same as an inverse. In particular, Aᵀ does not generally undo multiplication by A.
Understand row-by-column multiplication
If A has order m × n and B has order n × p, AB is defined and has order m × p. The inner dimensions must match. Each product entry is the sum of products from one row of A and one column of B. With and, the upper-left entry is 1 × 2 + 2 × 1 = 4. Completing the other entries gives.
Matrix multiplication is generally not commutative. In the same example, different from AB. Sometimes AB is defined while BA is not. Parentheses matter in powers: A² means AA, not squaring each entry separately. Matrix multiplication is associative for compatible orders, and it distributes over addition. The identity matrix satisfies when orders match. A zero product does not generally one entire matrix must be zero, so scalar cancellation habits need caution.
Calculate a determinant
A determinant is a scalar associated with a square matrix. For. It is not the matrix itself. For [[2, 1], [5, 3]], det A = 6 − 5 = 1. Reversing the subtraction changes the sign. A 2 × 2 matrix with determinant zero is singular and has no inverse. A nonzero determinant establishes that the corresponding two-equation system has a unique solution for each right-hand-side column.
For a 3 × 3 matrix [[a, b, c], [d, e, f], [g, h, i]], expansion along the first row gives. The alternating plus, minus, plus signs are essential. A triangular matrix has determinant equal to the product of its diagonal entries. For [[1, 2, 0], [0, 3, 4], [0, 0, 5]], the determinant is 15. For a general matrix, calculate each small 2 × 2 determinant separately to reduce sign errors.
Use a 2 × 2 inverse
For nonzero ad − bc, the inverse of [[a, b], [c, d]] is (1/(ad − bc))[[d, −b], [−c, a]]. Swap the two main-diagonal entries and change the signs of the other two, then multiply every entry by the reciprocal determinant. The inverse is defined by. Verify a suspected inverse by multiplication, especially if the determinant is negative or fractional. There is no general operation of dividing one matrix by another; specify inverse multiplication and its order.
For [[2, 1], [5, 3]], determinant 1 makes the inverse [[3, −1], [−5, 2]]. To solve 2x + y = 7 and 5x + 3y = 18, write AX = B with X = [[x], [y]] and. Multiply on the left by A⁻¹. Check the original equations. Multiplying B on the wrong side would be dimensionally invalid for this column representation.
Interpret singularity and check dimensions
If two rows are proportional, the determinant is zero. The system may have infinitely many solutions or none, depending on the constants. For x + y = 4 and 2x + 2y = 8, both equations describe the same line. Replacing 8 by 9 produces inconsistent parallel lines. “No inverse” therefore does not by itself distinguish these two cases. Self-check: find det [[4, 1], [2, 3]] and the order of a product of a 2 × 3 matrix with a 3 × 4 matrix. Answers are 10 and 2 × 4. Check orders before numerical work and separate a scalar determinant from a matrix result.
Check a general 3 × 3 determinant
For, expansion along the first row gives 1(0 − 24) − 2(0 − 20) + 3(0 − 5) = −24 + 40 − 15 = 1. Notice that subtracting the negative second minor produces a positive contribution. Writing the three minors separately reduces the temptation to lose this sign. This lesson computes inverses only for 2 × 2 matrices; a 3 × 3 determinant does not require applying an unprovided 3 × 3 inverse algorithm.
For applied data, label the entries before multiplying. If a row lists quantities of two products and a column lists their corresponding unit prices, their product is a one-entry matrix containing total cost. Reversing the product gives a different-sized array and a different meaning. Compatible dimensions establish that multiplication is possible; labels establish whether it answers the intended question.
If A is invertible, its inverse is also invertible and. Multiplying either pair in either order must recover the identity of the correct size.

