Row and column operations, Lecture notes of Linear Algebra

Row and column operations. It is often very useful to apply row and column operations to a matrix. Let us list what operations we're going to be using.

Typology: Lecture notes

2022/2023

Uploaded on 03/01/2023

laksh
laksh 🇺🇸

5

(2)

223 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Row and column operations
It is often very useful to apply row and column operations to a matrix. Let us list what
operations we’re going to be using.
We’ll illustrate these using the example matrix
123
456
789
.
Row/column operations
Adding a multiple of one row to another, e.g., r17→ r1+αr2:
1+4α2+5α3+6α
4 5 6
7 8 9
.
Scaling a row by some non-zero factor, e.g., r27→ λr2:
1 2 3
4λ5λ6λ
7 8 9
.
Swapping two rows, e.g., r2r3:
123
789
456
.
There are equivalent operations for columns, resulting in changes such as:
1 2 + α3
4 5 + 4α6
7 8 + 7α9
,
1 2λ3
4 5λ6
7 8λ9
,
132
465
798
Row (and column) operations can make a matrix ‘nice’
A matrix has a row-reduced form (and a column-reduced form, but let’s study rows), which
we obtain by row operations to make it as simple as possible. This form is such that:
each non-zero row starts with some number of 0s, then an initial 1, then other entries;
in each column which features some row’s initial 1, the other entries are 0 (since with row
operations we may use that 1 to clear the rest of the column);
columns which do not feature some row’s initial 1 may have other exciting entries (since
we cannot clear them).
the resulting non-zero rows are linearly independent (as the positions of the initial 1s shows)
There is an algorithm to transform a matrix into row-reduced form.
1. Start with the left-hand column. If it is entirely 0, we move to the next column.
Otherwise, pick some non-zero entry x. Scale the row xis in by 1/x and swap it to
the top, giving us a 1 as the first non-zero entry in the top row. Then add suitable
multiples of this row to the other rows to make the rest of the column xwas in 0.
So now the first non-zero entry in the top row is 1, and all entries beneath it are 0.
This row is now locked in place: we might add things to it, but we’ll never scale or
swap it again.
2. Move to the next column. Ignoring the locked top row, are there any non-zero entries
in this column? If not, move on. Otherwise, pick some non-zero entry y. Scale the row
yis in by 1/y and swap it to the second row, giving us a 1 as the first non-zero entry in
the second row. (Note that it occurs in a column to the right of the 1 in the top row.)
Then add suitable multiples of this second row to the other rows (including the top
row) to make the rest of the column ywas in 0. The second row is then locked in place.
3. Move to the next column, and repeat.
1
pf3
pf4
pf5

Partial preview of the text

Download Row and column operations and more Lecture notes Linear Algebra in PDF only on Docsity!

Row and column operations

It is often very useful to apply row and column operations to a matrix. Let us list what operations we’re going to be using.

We’ll illustrate these using the example matrix

Row/column operations

  • Adding a multiple of one row to another, e.g., r 1 7 → r 1 + αr 2 :

1 + 4α 2 + 5α 3 + 6α 4 5 6 7 8 9

  • Scaling a row by some non-zero factor, e.g., r 2 7 → λr 2 :

4 λ 5 λ 6 λ 7 8 9

  • Swapping two rows, e.g., r 2 ↔ r 3 :

There are equivalent operations for columns, resulting in changes such as:  

1 2 + α 3 4 5 + 4α 6 7 8 + 7α 9

1 2 λ 3 4 5 λ 6 7 8 λ 9

Row (and column) operations can make a matrix ‘nice’

A matrix has a row-reduced form (and a column-reduced form, but let’s study rows), which we obtain by row operations to make it as simple as possible. This form is such that:

  • each non-zero row starts with some number of 0s, then an initial 1, then other entries;
  • in each column which features some row’s initial 1, the other entries are 0 (since with row operations we may use that 1 to clear the rest of the column);
  • columns which do not feature some row’s initial 1 may have other exciting entries (since we cannot clear them).
  • the resulting non-zero rows are linearly independent (as the positions of the initial 1s shows)

There is an algorithm to transform a matrix into row-reduced form.

  1. Start with the left-hand column. If it is entirely 0, we move to the next column. Otherwise, pick some non-zero entry x. Scale the row x is in by 1/x and swap it to the top, giving us a 1 as the first non-zero entry in the top row. Then add suitable multiples of this row to the other rows to make the rest of the column x was in 0. So now the first non-zero entry in the top row is 1, and all entries beneath it are 0. This row is now locked in place: we might add things to it, but we’ll never scale or swap it again.
  2. Move to the next column. Ignoring the locked top row, are there any non-zero entries in this column? If not, move on. Otherwise, pick some non-zero entry y. Scale the row y is in by 1/y and swap it to the second row, giving us a 1 as the first non-zero entry in the second row. (Note that it occurs in a column to the right of the 1 in the top row.) Then add suitable multiples of this second row to the other rows (including the top row) to make the rest of the column y was in 0. The second row is then locked in place.
  3. Move to the next column, and repeat.

We illustrate it here by an example. Let A =

We’ll pick the 3 in the first column. We scale row 2 by 13 and swap the first and second rows.

r 2 7 → 13 r 2 −→

r 1 ↔r 2 −→

We subtract multiples of row 1 from rows 3 and 4

r 3 7 → −→r 3 − 2 r 1

r 4 7 → −→r 4 −r 1

We like the 1 in the second column, fourth row, so we swap rows 2 and 4, then subtract twice row 2 from row 4. We then skip over the third column (as its only non-zero entries are locked), and skip over the empty fourth column.

r 2 ↔r 4 −→

r 4 7 →r 4 − 2 r 2 −→

We decide (fairly arbitrarily) to pick the −8. We scale row 4 and swap it with row 3.

r 4 7 →− 18 r 4 −→

r 3 ↔r 4 −→

We clear the final column, using the third row.

r 17 →r 1 − 2 r 3 r 27 →r 2 − 4 r 3 −→ r 47 →r 4 − 3 r 3

We cannot clear the third column, as there is no available initial 1 in the lower rows.

There is a similar procedure for column reduction, doing exactly the same thing, only to the columns. If we use both row and column operations, then we can tidy the matrix even more. We could continue the example above as follows.

c 37 → −→c 3 − 2 c 1 c 37 →c 3 − 3 c 2

c (^3) −→↔c 5

This is the fully-reduced form of A. Any matrix can be put into a form this simple, providing we’re allowed (see next page) to use both row and column operations.

Given that, it is clear that an invertible (square) matrix has fully-reduced form equal to the identity matrix I. However, such a matrix in fact has its row-reduced (or column-reduced) form equal to I. In our row operations, we cannot end up with a row entirely of 0s, so each row must have an initial 1 in it, and no two initial 1s can appear in the same column, so we must have an initial 1 in each diagonal place. Then their columns are cleared, giving us I.

Row operations preserve the row span and kernel of a matrix

To find the kernel of the same original matrix A, we want to solve

Ax =

x y z

x + 2y + 3z 4 x + 5y + 6z 7 x + 8y + 9z

We could solve these three equations simultaneously, but the standard manoeuvres there, such as subtracting one equation from another, are clearly equivalent to row operations.

And this makes sense. We are trying to find the vectors x which dot (in the sense of the scalar product) with each row of the matrix to give 0. If a vector dots with each row to give 0, then it dots with any row combination to give 0. So we are seeking the vectors x which are orthogonal to the whole of the span of the rows.

In other words: the kernel is the set of vectors orthogonal to the row span.

And, just as with the columns before: row operations preserve the row span.

And therefore: row operations preserve the kernel of the matrix.

So, to find the kernel of a matrix, we can fully row-reduce it, as follows.

 

 r^2 7 → −→r^2 −^4 r^1 r 3 7 →r 3 − 7 r 1

 r^2 7 →−^

(^13) r 2 −→

 r^17 → −→r^1 −^2 r^2 r 37 →r 3 +6r 2

Hence for the kernel, we need vectors x such that x = z and y = − 2 z.

I.e., a basis for the kernel is

Warning. Column operations destroy the kernel!

This should be even more clear than for the image: when solving simultaneous equations, we can’t just go and move coefficients around within each equation.

So, if we care about the kernel of our matrix A, we must be careful only to use row operations.

However, if we care only about the rank or nullity of A, then we can perform full reduction.

Elementary matrices

Let’s take an example. Let

A =

 , E =

1 α 0 0 1 0 0 0 1

 , M =

0 λ 0 0 0 1

 , S =

where λ 6 = 0. We get the following behaviour.

  1. Applying E on the left and the right of A.

EA =

1 + 4α 2 + 5α 3 + 6α 4 5 6 7 8 9

 , AE =

1 α + 2 3 4 4 α + 5 6 7 7 α + 8 9

I.e., multiplying on the left by E adds α times row 2 to row 1, while multiplying on the right by E adds α times column 1 to column 2.

More generally, if i 6 = j, the matrix which is I plus an α in the (i, j) place is such that multiplying on the left by adds α times row j to row i, while multiplying on the right adds α times column i to column j.

  1. Applying M on the left and the right of A.

M A =

4 λ 5 λ 6 λ 7 8 9

 , AM =

1 2 λ 3 4 5 λ 6 7 8 λ 9

I.e., multiplying on the left by M scales row 2 by λ, while multiplying on the right by M scales column 2 by λ.

More generally, the matrix which is I except for λ 6 = 0 in the (i, i) place is such that multiplying on the left scales row i by λ, while multiplying on the right scales column i by λ.

  1. Applying S on the left and the right of A.

SA =

 , AS =

I.e., multiplying on the left by S swaps rows 2 and 3, while multiplying on the right by S swaps columns 2 and 3.

More generally, the matrix which is I except for having 0 in the (i, i) and (j, j) places, and 1 in the (i, j) and (j, i) places, is such that multiplying on the left swaps rows i and j, while multiplying on the right swaps columns i and j.

Therefore: row operations can be achieved by matrix multiplication on the left, and column operations can be achieved by matrix multiplication on the right.

This further explains the behaviour on pages 3 and 4.

Suppose we have the matrix A, and perform column operations by multiplying on the right by matrices C 1 , C 2 , C 3. We get AC 1 C 2 C 3. The Ci are invertible, so their image is all of Rn, and then we apply A as the final step. Hence the overall image is that of A itself.

Suppose we instead perform row operations by multiplying on the left by matrices R 1 , R 2 , R 3. We get R 3 R 2 R 1 A. Any vector in the kernel of A gets sent to 0 by the initial application of A, and stays there. Any vector not sent to 0 by A doesn’t later get sent to 0 by the Ri, since they are invertible. Hence the overall kernel is that of A itself.

It also explains how the “wrong” operations break things: the Ci move other things into the way of A’s kernel, and the Ri move A’s image around.