Unit 3 of 4 · BCA Sem 1

Unit 3: Matrices

Mathematics notes · PTU syllabus (UGCC2501)

3 min read5 topics10 exam questions
On this page
  1. Unit summary
  2. Introduction to matrices
  3. Types of matrices
  4. Scalar multiplication, negative, addition and difference
  5. Multiplication of matrices
  6. Transpose of a matrix
  7. Key terms
  8. Quick revision
  9. Important questions

Unit summary

A matrix is a rectangular arrangement of numbers in rows and columns. Matrices are used everywhere in computing: images are matrices of pixels, spreadsheets are matrices, and computer graphics and machine learning are built on matrix operations.

This unit covers the types of matrices and the basic operations: scalar multiplication, addition, subtraction, multiplication and transpose.

After this unit you can

  • Identify the order and type of a matrix
  • Add, subtract and scalar-multiply matrices
  • Multiply two matrices and check when multiplication is possible
  • Find the transpose and use its properties

PTU syllabus topics

  • Introduction
  • types of matrix (row, column, rectangular, square, diagonal, scalar, unit, null, comparable, equal)
  • scalar multiplication
  • negative of a matrix
  • addition and difference of matrices
  • multiplication of matrices
  • transpose of a matrix
Key formulasMatrix rules to remember
  • Addition

    (A + B)ᵢⱼ = aᵢⱼ + bᵢⱼ

    Only for matrices of the same order

  • Multiplication

    (AB)ᵢⱼ = Σ aᵢₖ bₖⱼ

    Columns of A must equal rows of B

  • Transpose

    (Aᵀ)ᵢⱼ = aⱼᵢ

    Rows become columns

  • Order rule

    AB ≠ BA in general

    Matrix multiplication is not commutative

1

Topic 1

Introduction to matrices

A matrix is a rectangular array of numbers arranged in rows (horizontal) and columns (vertical), enclosed in brackets. A matrix with m rows and n columns has order m × n. The element in row i and column j is written aᵢⱼ.

Example

A = [2 5 7; 1 0 3] has 2 rows and 3 columns, so its order is 2 × 3, and a₁₃ = 7.

Exam tip

The order is always written as rows × columns. A 2 × 3 matrix has 6 elements.

2

Topic 2

Types of matrices

TypeDefinitionExample
Row matrixOnly one row (1 × n)[3 1 4]
Column matrixOnly one column (m × 1)[2; 5; 9]
Rectangular matrixRows ≠ columns2 × 3 matrix
Square matrixRows = columns3 × 3 matrix
Diagonal matrixSquare; all non-diagonal elements are 0[4 0; 0 7]
Scalar matrixDiagonal matrix with all diagonal elements equal[5 0; 0 5]
Unit (identity) matrixScalar matrix with diagonal elements 1, written I[1 0; 0 1]
Null (zero) matrixEvery element is 0, written O[0 0; 0 0]
  • Comparable matrices have the same order.
  • Equal matrices have the same order and equal corresponding elements.

Exam tip

Every unit matrix is a scalar matrix, and every scalar matrix is a diagonal matrix — but not the other way round.

3

Topic 3

Scalar multiplication, negative, addition and difference

  • Scalar multiplication: multiply every element by the number k. If A = [1 2; 3 4], then 3A = [3 6; 9 12].
  • Negative of a matrix: −A = (−1)A, so every element changes sign.
  • Addition and subtraction: only for matrices of the same order; add or subtract corresponding elements.

Example

A = [2 3; 1 4], B = [5 1; 0 2]. A + B = [7 4; 1 6] and A − B = [−3 2; 1 2].

Properties of addition: A + B = B + A (commutative), (A + B) + C = A + (B + C) (associative), A + O = A, and A + (−A) = O.

4

Topic 4

Multiplication of matrices

The product AB is defined only when the number of columns of A equals the number of rows of B. If A is m × n and B is n × p, then AB is m × p.

ProcessHow to multiply two matrices
  1. 1Check orders

    Columns of A must equal rows of B

  2. 2Pick row i of A
  3. 3Pick column j of B
  4. 4Multiply pairwise and add

    This gives element (i, j) of AB

  5. 5Repeat for every row and column

Example

A = [1 2; 3 4], B = [5 6; 7 8]. AB = [1·5 + 2·7 1·6 + 2·8; 3·5 + 4·7 3·6 + 4·8] = [19 22; 43 50].

  • Matrix multiplication is not commutative: in general AB ≠ BA.
  • It is associative: (AB)C = A(BC), and distributive: A(B + C) = AB + AC.
  • AI = IA = A for the identity matrix I.

Exam tip

Always write "Since A is m × n and B is n × p, AB exists and is of order m × p" before multiplying. Examiners give marks for it.

5

Topic 5

Transpose of a matrix

The transpose of A, written Aᵀ or A', is obtained by changing rows into columns. If A is m × n, Aᵀ is n × m.

Example

A = [1 2 3; 4 5 6] (2 × 3). Aᵀ = [1 4; 2 5; 3 6] (3 × 2).

Properties:

  • (Aᵀ)ᵀ = A
  • (A + B)ᵀ = Aᵀ + Bᵀ
  • (kA)ᵀ = kAᵀ
  • (AB)ᵀ = BᵀAᵀ (note the reversed order)
  • A square matrix is symmetric if Aᵀ = A and skew-symmetric if Aᵀ = −A.

Key terms

Order
The size of a matrix, rows × columns
Square matrix
A matrix with equal numbers of rows and columns
Identity matrix
A square matrix with 1s on the diagonal and 0s elsewhere
Comparable matrices
Matrices of the same order
Transpose
The matrix formed by interchanging rows and columns
Symmetric matrix
A square matrix equal to its own transpose

Quick revision

  • Order is rows × columns.
  • Add or subtract only matrices of the same order.
  • AB exists only if columns of A = rows of B; then the order is m × p.
  • AB ≠ BA in general.
  • (AB)ᵀ = BᵀAᵀ.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Define a matrix and its order.
  2. Q2.Differentiate between a scalar matrix and a unit matrix.
  3. Q3.When are two matrices said to be equal?
  4. Q4.State the condition for multiplying two matrices.
  5. Q5.If A = [1 2; 3 4], find 2A and Aᵀ.
  6. Q6.Define a symmetric matrix with an example.

Long-answer questions

  1. Q1.Explain the different types of matrices with examples.
  2. Q2.If A = [1 2; 3 4] and B = [2 0; 1 3], find AB and BA and show that AB ≠ BA.
  3. Q3.Verify that (AB)ᵀ = BᵀAᵀ for A = [1 2; 0 1] and B = [3 1; 2 4].
  4. Q4.If A = [2 3; 1 5] and B = [1 −1; 2 0], find A + B, A − B, 3A − 2B and Aᵀ.

Stuck on this unit?

Message SBS on WhatsApp for help with Mathematics, or to ask about studying BCA at Synetic.

WhatsApp us