You have now solved systems of equations by writing them in terms of an augmented matrix and then doing row operations on this augmented matrix. It turns out that such rectangular arrays of numbers are important from many other different points of view. Numbers are also called scalars. In general, scalars are just elements of some field. However, in the first part of this book, the field will typically be either the real numbers or the complex numbers.
A matrix is a rectangular array of numbers. Several of them are referred to as matrices. For example, here is a matrix.

This matrix is a 3 × 4 matrix because there are three rows and four columns. The first row is
There are various operations which are done on matrices. They can sometimes be added, multiplied by a scalar and sometimes multiplied. To illustrate scalar multiplication, consider the following example.

The new matrix is obtained by multiplying every entry of the original matrix by the given scalar. If A is an m × n matrix −A is defined to equal
Two matrices which are the same size can be added. When this is done, the result is the matrix which is obtained by adding corresponding entries. Thus

Two matrices are equal exactly when they are the same size and the corresponding entries are identical. Thus

because they are different sizes. As noted above, you write
The above discussion stated for general matrices is given in the following definition.
Definition 2.1.1 Let A =

for c_{ij} = a_{ij} + b_{ij}. Also if x is a scalar,

where c_{ij} = xa_{ij}. The number A_{ij} will typically refer to the ij^{th} entry of the matrix A. The zero matrix, denoted by 0 will be the matrix consisting of all zeros.
Do not be upset by the use of the subscripts, ij. The expression c_{ij} = a_{ij} + b_{ij} is just saying that you add corresponding entries to get the result of summing two matrices as discussed above.
Note that there are 2 × 3 zero matrices, 3 × 4 zero matrices, etc. In fact for every size there is a zero matrix.
With this definition, the following properties are all obvious but you should verify all of these properties are valid for A, B, and C, m × n matrices and 0 an m × n zero matrix,
 (2.1) 
the commutative law of addition,
 (2.2) 
the associative law for addition,
 (2.3) 
the existence of an additive identity,
 (2.4) 
the existence of an additive inverse. Also, for α,β scalars, the following also hold.
 (2.5) 
 (2.6) 
 (2.7) 
 (2.8) 
The above properties, 2.1  2.8 are known as the vector space axioms and the fact that the m×n matrices satisfy these axioms is what is meant by saying this set of matrices with addition and scalar multiplication as defined above forms a vector space.
Definition 2.1.2 Matrices which are n × 1 or 1 × n are especially called vectors and are often denoted by a bold letter. Thus

is an n × 1 matrix also called a column vector while a 1 × n matrix of the form
All the above is fine, but the real reason for considering matrices is that they can be multiplied. This is where things quit being banal.
First consider the problem of multiplying an m × n matrix by an n × 1 column vector. Consider the following example

It equals

Thus it is what is called a linear combination of the columns. These will be discussed more later. Motivated by this example, here is the definition of how to multiply an m×n matrix by an n × 1 matrix (vector).
Definition 2.1.3 Let A = A_{ij} be an m × n matrix and let v be an n × 1 matrix,

where a_{i} is an m × 1 vector. Then Av, written as

is the m × 1 column vector which equals the following linear combination of the columns.
 (2.9) 
If the j^{th} column of A is

then 2.9 takes the form

Thus the i^{th} entry of Av is ∑ _{j=1}^{n}A_{ij}v_{j}. Note that multiplication by an m × n matrix takes an n × 1 matrix, and produces an m × 1 matrix (vector).
Here is another example.
Example 2.1.4 Compute

First of all, this is of the form

With this done, the next task is to multiply an m × n matrix times an n × p matrix. Before doing so, the following may be helpful.


Definition 2.1.5 Let A be an m × n matrix and let B be an n × p matrix. Then B is of the form

where b_{k} is an n × 1 matrix. Then an m × p matrix AB is defined as follows:
 (2.10) 
where Ab_{k} is an m × 1 matrix. Hence AB as just defined is an m × p matrix. For example,
Example 2.1.6 Multiply the following.

The first thing you need to check before doing anything else is whether it is possible to do the multiplication. The first matrix is a 2 × 3 and the second matrix is a 3 × 3. Therefore, is it possible to multiply these matrices. According to the above discussion it should be a 2 × 3 matrix of the form

You know how to multiply a matrix times a vector and so you do so to obtain each of the three columns. Thus

Here is another example.
Example 2.1.7 Multiply the following.

First check if it is possible. This is of the form

Matrix multiplication is not commutative. This is very different than multiplication of numbers!