6. Linear Algebra

Matrices And Matrix Operations

Matrices and Matrix Operations

students, welcome to one of the most useful ideas in engineering mathematics 📘. Matrices are not just neat tables of numbers—they are a powerful way to organize data, model systems, and solve real problems in science and engineering. In this lesson, you will learn what matrices are, how to perform matrix operations, and why these ideas matter in linear algebra.

What you will learn

  • What a matrix is and how it is written
  • How to add, subtract, and multiply matrices
  • How scalar multiplication works
  • Why matrix dimensions matter
  • How matrix operations help with engineering and linear algebra problems

Think about a spreadsheet used to track temperatures, sales, or machine outputs. A matrix is like a structured version of that table. It can store data compactly and allow us to calculate with many values at once. That is why matrices appear in robotics 🤖, electrical networks, computer graphics, and systems of equations.

What is a matrix?

A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. A matrix is usually written inside brackets.

For example,

$$

A = $\begin{bmatrix} 2$ & 5 \ -1 & $3 \end{bmatrix}$

$$

This matrix has $2$ rows and $2$ columns, so it is a $2 \times 2$ matrix. The entry in row $1$, column $2$ is $5$.

A matrix with $m$ rows and $n$ columns is called an $m \times n$ matrix. The size or shape of a matrix is very important because it determines which operations are allowed.

Here are some common terms:

  • Entry: one number inside the matrix
  • Row: a horizontal line of entries
  • Column: a vertical line of entries
  • Square matrix: a matrix with the same number of rows and columns
  • Diagonal entries: entries from the top-left to the bottom-right of a square matrix

For example, in

$$

B = $\begin{bmatrix} 4$ & 0 & 1 \ 2 & 7 & -$3 \end{bmatrix}$

$$

$B$ is a $2 \times 3$ matrix. The first row is $[4, 0, 1]$, and the second column is $[0, 7]^T$.

Matrix addition, subtraction, and scalar multiplication

Matrix operations follow clear rules. The simplest ones are addition, subtraction, and multiplying by a number.

Addition and subtraction

Two matrices can be added or subtracted only if they have the same dimensions. You combine corresponding entries.

If

$$

A = $\begin{bmatrix} 1$ & 4 \ 3 & -$2 \end{bmatrix}$, \quad C = $\begin{bmatrix} 5$ & 1 \ -1 & $6 \end{bmatrix}$

$$

then

$$

A + C = $\begin{bmatrix} 1$+5 & 4+1 \ 3+(-1) & -2+$6 \end{bmatrix}$ = $\begin{bmatrix} 6$ & 5 \ 2 & $4 \end{bmatrix}$

$$

Similarly,

$$

A - C = $\begin{bmatrix} 1$-5 & 4-1 \ 3-(-1) & -2-$6 \end{bmatrix}$ = $\begin{bmatrix}$ -4 & 3 \ 4 & -$8 \end{bmatrix}$

$$

This is like comparing two data tables entry by entry, such as temperature changes in two different cities 🌡️.

Scalar multiplication

A scalar is just a single number. To multiply a matrix by a scalar, multiply every entry by that number.

If

$$

D = $\begin{bmatrix} 2$ & -1 \ 0 & $3 \end{bmatrix}$

$$

then

$$

3D = $\begin{bmatrix} 6$ & -3 \ 0 & $9 \end{bmatrix}$

$$

This is useful when a system needs to be scaled. For example, if a machine produces twice as much output, the data matrix representing output values can be doubled.

Important rule

Matrix addition and subtraction are only possible when the matrices have the same size. If one matrix is $2 \times 3$ and another is $3 \times 2$, they cannot be added. This matters because matrix operations must stay consistent with the structure of the data.

Matrix multiplication

Matrix multiplication is more powerful than addition, but also more restrictive. It does not work the same way as ordinary number multiplication. In general, $AB$ is not equal to $BA$.

To multiply two matrices, the number of columns of the first matrix must equal the number of rows of the second matrix.

If $A$ is an $m \times n$ matrix and $B$ is an $n \times p$ matrix, then the product $AB$ is an $m \times p$ matrix.

The entry in row $i$ and column $j$ of $AB$ is found by taking the dot product of row $i$ of $A$ with column $j$ of $B$.

For example, let

$$

A = $\begin{bmatrix} 1$ & 2 \ 3 & $4 \end{bmatrix}$, \quad B = $\begin{bmatrix} 5$ & 6 \ 7 & $8 \end{bmatrix}$

$$

Then

$$

AB = $\begin{bmatrix} 1$$\cdot 5$ + $2\cdot 7$ & $1\cdot 6$ + $2\cdot 8$ \ $3\cdot 5$ + $4\cdot 7$ & $3\cdot 6$ + $4\cdot 8$ $\end{bmatrix}$

= $\begin{bmatrix} 19$ & 22 \ 43 & $50 \end{bmatrix}$

$$

Now compare $AB$ with $BA$:

$$

BA = $\begin{bmatrix} 5$$\cdot 1$ + $6\cdot 3$ & $5\cdot 2$ + $6\cdot 4$ \ $7\cdot 1$ + $8\cdot 3$ & $7\cdot 2$ + $8\cdot 4$ $\end{bmatrix}$

= $\begin{bmatrix} 23$ & 34 \ 31 & $46 \end{bmatrix}$

$$

So $AB \neq BA$. This is an important feature of matrix multiplication. In engineering, order matters because one transformation may happen before another, such as rotating an object and then scaling it. 🔄

Why matrix multiplication works

Matrix multiplication is designed to combine linear transformations and systems of equations. For example, in computer graphics, a matrix may rotate a shape, while another matrix may stretch it. Multiplying the matrices gives a single matrix that combines both actions.

Identity and zero matrices

Some matrices play special roles.

The zero matrix has all entries equal to $0$. For example,

$$

O = $\begin{bmatrix} 0$ & 0 \ 0 & $0 \end{bmatrix}$

$$

Adding the zero matrix does not change another matrix:

$$

$A + O = A$

$$

The identity matrix is a square matrix with $1$ on the main diagonal and $0$ everywhere else. For a $2 \times 2$ matrix,

$$

I = $\begin{bmatrix} 1$ & 0 \ 0 & $1 \end{bmatrix}$

$$

Multiplying by the identity matrix does not change a matrix:

$$

$AI = IA = A$

$$

The identity matrix acts like the number $1$ in ordinary multiplication. It is important in matrix inverses and solving equations.

Transpose of a matrix

The transpose of a matrix is made by turning rows into columns. If a matrix is $A$, its transpose is written as $A^T$.

For example,

$$

A = $\begin{bmatrix} 1$ & 4 & 7 \ 2 & 5 & $8 \end{bmatrix}$

$$

then

$$

A^T = $\begin{bmatrix} 1$ & 2 \ 4 & 5 \ 7 & $8 \end{bmatrix}$

$$

Transposes are useful in data analysis, geometry, and when working with symmetric matrices. A matrix is symmetric if $A = A^T$.

Real-world meaning in engineering mathematics

students, matrices are not just abstract symbols—they represent real systems 🛠️.

A company may use a matrix to store production levels from several factories across several days. A civil engineer may use matrices to model forces in a structure. In electrical engineering, matrices help describe currents and voltages in a network. In computer animation, matrices move and rotate images on a screen.

Consider a simple example where two machines make two products. Suppose the matrix

$$

P = $\begin{bmatrix} 10$ & 6 \ 4 & $9 \end{bmatrix}$

$$

shows units produced by Machine $1$ and Machine $2$ over two days. The first row could represent Day $1$ and Day $2$, while the columns could represent the two machines. Operations on $P$ can compare output, scale production, or combine it with another data set.

This is one reason matrices are central to linear algebra: they provide a compact way to represent and manipulate linear relationships.

How matrices connect to linear algebra

Linear algebra studies vectors, matrices, systems of equations, and transformations that preserve linear structure. Matrices are one of the main tools in this subject.

A system of equations can be written in matrix form. For example,

$$

$\begin{aligned}$

$2x + y &= 5 \\$

$3x - 4y &= 6$

$\end{aligned}$

$$

can be written as

$$

$\begin{bmatrix} 2$ & 1 \ 3 & -$4 \end{bmatrix}$

$\begin{bmatrix} x \ y \end{bmatrix}$

$=$

$\begin{bmatrix} 5 \ 6 \end{bmatrix}$

$$

This shows how matrices help organize simultaneous linear equations, which is a major topic in engineering mathematics. Later, determinants and inverses will help solve such systems when the matrix is square and invertible.

Matrix operations also describe linear transformations. For instance, multiplying a vector by a matrix can rotate, reflect, stretch, or compress it. That connection is one reason matrices are so important in both theory and practice.

Conclusion

Matrices provide a structured way to store and calculate with information. students, by learning matrix addition, subtraction, scalar multiplication, multiplication, transpose, and the special matrices, you are building the foundation for many later topics in engineering mathematics. These ideas are essential for solving equations, modeling systems, and understanding linear transformations. In linear algebra, matrices are a bridge between abstract math and real-world applications.

Study Notes

  • A matrix is a rectangular array of entries arranged in rows and columns.
  • The size of a matrix is written as $m \times n$.
  • Matrices can be added or subtracted only if they have the same dimensions.
  • Scalar multiplication means multiplying every entry by the same number.
  • For matrix multiplication $AB$, the number of columns of $A$ must equal the number of rows of $B$.
  • In general, $AB \neq BA$.
  • The zero matrix has all entries equal to $0$.
  • The identity matrix has $1$ on the main diagonal and $0$ elsewhere.
  • The transpose of a matrix turns rows into columns.
  • Matrices are widely used in engineering, science, graphics, and systems of equations.
  • Matrices are a core part of linear algebra and support later topics such as determinants, inverses, and simultaneous equations.

Practice Quiz

5 questions to test your understanding

Matrices And Matrix Operations — Engineering Mathematics | A-Warded