Matrices Problems- Practice and Solutions

What Are Matrices and Why You Need to Master Them

A matrix is a rectangular array of numbers arranged in rows and columns. It looks like this:

[ 2 5 7 ] [ 1 3 4 ]

This is a 2×3 matrix — 2 rows, 3 columns. The dimensions always come first: rows, then columns.

Matrices show up everywhere in linear algebra, computer graphics, physics, data science, and machine learning. If you're studying engineering, math, or anything technical, you'll run into them constantly.

Most students struggle because they try to memorize everything instead of understanding the patterns. This guide fixes that.

Types of Matrices You Must Know

Matrix Operations: The Basics

Addition and Subtraction

You can only add matrices with identical dimensions. Add corresponding elements directly.

Example:

[ 1 2 ] [ 5 6 ] [ 1+5 2+6 ] [ 6 8 ] [ 3 4 ] + [ 7 8 ] = [ 3+7 4+8 ] = [ 10 12 ]

Subtraction works the same way. Just subtract each element.

Scalar Multiplication

Multiply every element by the scalar (regular number).

Example: 3 × [ 2 4 ] = [ 6 12 ]

Nothing complicated here. Just distribute the multiplication.

Matrix Multiplication

This is where most students fail. Matrix multiplication is NOT element-by-element.

The rule: If you multiply an m×n matrix by an n×p matrix, you get an m×p matrix.

The inner dimensions must match. The result takes the outer dimensions.

How to Multiply Two Matrices

Take the dot product of each row of the first matrix with each column of the second matrix.

Example:

[ 1 2 ] [ 5 6 ] [ 3 4 ] × [ 7 8 ]

Result is 2×2.

Element (1,1): (1×5) + (2×7) = 5 + 14 = 19
Element (1,2): (1×6) + (2×8) = 6 + 16 = 22
Element (2,1): (3×5) + (4×7) = 15 + 28 = 43
Element (2,2): (3×6) + (4×8) = 18 + 32 = 50

Result: [ 19 22 ] [ 43 50 ]

⚠️ Matrix multiplication is NOT commutative. A × B ≠ B × A in most cases.

Determinants: How to Calculate Them

The determinant is a single number derived from a square matrix. It tells you if the matrix is invertible.

2×2 Determinant

For [ a b ]
[ c d ]

det = (a × d) - (b × c)

Super simple. Just cross multiply and subtract.

3×3 Determinant (Rule of Sarrus)

Write the first two columns again to the right, then sum the products of the three diagonals running right to left, and subtract the products of the three diagonals running left to right.

Or use cofactor expansion — pick a row or column with zeros if possible, then expand along it.

3×3 Example

Find det of:

[ 1 2 3 ]
[ 0 4 5 ]
[ 1 0 6 ]

Using first row expansion:
det = 1 × [(4×6) - (5×0)] - 2 × [(0×6) - (5×1)] + 3 × [(0×0) - (4×1)]
det = 1 × 24 - 2 × (-5) + 3 × (-4)
det = 24 + 10 - 12
det = 22

Inverse of a Matrix

The inverse of matrix A (written A-1) is the matrix that, when multiplied by A, gives the identity matrix.

A × A-1 = I

Only square matrices can have inverses. A matrix has an inverse only if its determinant is non-zero.

How to Find the Inverse of a 2×2 Matrix

For [ a b ]
[ c d ]

A-1 = (1/det) × [ d -b ]
[ -c a ]

Swap the diagonal elements, negate the off-diagonal, then divide by the determinant.

Inverse Example

Find A-1 if A = [ 4 7 ]
[ 2 6 ]

det = (4×6) - (7×2) = 24 - 14 = 10

A-1 = (1/10) × [ 6 -7 ]
[ -2 4 ]

A-1 = [ 0.6 -0.7 ]
[ -0.2 0.4 ]

Practice Problems with Solutions

Problem 1: Matrix Addition

Add these matrices:

[ 2 3 ] [ 1 4 ]
[ 5 7 ] + [ 2 9 ]

Solution:

[ 2+1 3+4 ] [ 3 7 ]
[ 5+2 7+9 ] = [ 7 16 ]

Problem 2: Scalar Multiplication

Find 4 × [ 1 2 3 ]

Solution:

[ 4 8 12 ]

Problem 3: Matrix Multiplication

Multiply:

[ 1 2 ] [ 3 ]
[ 3 4 ] × [ 5 ]

Solution: (2×2) × (2×1) = (2×1)

Row 1: (1×3) + (2×5) = 3 + 10 = 13
Row 2: (3×3) + (4×5) = 9 + 20 = 29

Result: [ 13 ]
[ 29 ]

Problem 4: Determinant

Find det of [ 3 8 ]
[ 4 6 ]

Solution:

det = (3×6) - (8×4) = 18 - 32 = -14

Problem 5: Inverse

Find A-1 if A = [ 2 1 ]
[ 5 3 ]

Solution:

det = (2×3) - (1×5) = 6 - 5 = 1

A-1 = (1/1) × [ 3 -1 ]
[ -5 2 ]

A-1 = [ 3 -1 ]
[ -5 2 ]

Problem 6: System of Equations via Matrices

Solve using matrices:

2x + y = 8
x + 3y = 9

Solution:

Write as AX = B:

[ 2 1 ] [ x ] = [ 8 ]
[ 1 3 ] [ y ] [ 9 ]

Find A-1:

det = (2×3) - (1×1) = 6 - 1 = 5

A-1 = (1/5) × [ 3 -1 ]
[ -1 2 ]

X = A-1B:

x = (1/5)[3(8) + (-1)(9)] = (1/5)[24 - 9] = 15/5 = 3
y = (1/5)[-1(8) + 2(9)] = (1/5)[-8 + 18] = 10/5 = 2

Check: 2(3) + 2 = 8 ✓ and 3 + 3(2) = 9 ✓

Common Mistakes to Avoid

Matrix Operations Reference Table

Operation Requirement Result Size Key Rule
Addition/Subtraction Same dimensions Same as inputs Element-by-element
Scalar Multiplication Any matrix Same as input Multiply every element
Multiplication Inner dimensions match Outer dimensions Row × Column dot product
Transpose Any matrix Swap rows/columns Flip across diagonal
Determinant Square matrix only Single number Zero = not invertible
Inverse Square, det ≠ 0 Same as input A × A-1 = I

Getting Started: Your Action Plan

Stop watching videos and start doing problems. Here's what to do:

  1. Memorize the dimensions rule. Write it down. Repeat it. You can't skip this.
  2. Practice 2×2 matrix multiplication until you can do it in your sleep.
  3. Learn determinant shortcuts for 2×2 and 3×3 matrices first.
  4. Master the inverse formula for 2×2 matrices — it's the most common question type.
  5. Solve at least 10 problems daily for a week. There's no substitute for repetition.
  6. Check your answers by multiplying the result back. If A × A-1 ≠ I, you made a mistake.

When to Use Calculator vs. Hand Calculation

For 2×2 and 3×3 matrices, do it by hand until you're fast and accurate. This builds intuition.

For 4×4 and larger, use a calculator or software. The arithmetic gets tedious and error-prone beyond 3×3.

On exams, they usually stick to 2×2 or 3×3 anyway. Master those first.