0% found this document useful (0 votes)
68 views4 pages

James Mcivor: A B C B

This document contains notes from a math lecture on solving systems of linear Diophantine equations. It discusses: 1) Finding the solutions to a single linear Diophantine equation ax + by = c. 2) Extending this to solve systems of multiple linear equations using the Smith Normal Form (SNF). 3) An example of using the SNF to find all integer solutions to a system of 4 equations in 4 variables.

Uploaded by

Matthew Steven
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views4 pages

James Mcivor: A B C B

This document contains notes from a math lecture on solving systems of linear Diophantine equations. It discusses: 1) Finding the solutions to a single linear Diophantine equation ax + by = c. 2) Extending this to solve systems of multiple linear equations using the Smith Normal Form (SNF). 3) An example of using the SNF to find all integer solutions to a system of 4 equations in 4 variables.

Uploaded by

Matthew Steven
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MATH 115, SUMMER 2012

LECTURE 23

JAMES MCIVOR

1. Intro to Diophantine Equations - One Linear Equation


We spent a lot of time studying solutions to congruences.
- A Diophantine Equation is an equation, usually polynomial, with integer
coefficients, for which we seek solutions in integers.
- We’ll spend the next week or so studying these, with an aim to introduce some
geometric ideas to their solutions. The interaction of number theory and geometry
is the source of some very exciting ideas in modern math.
- we begin with a linear diophantine equation: what are the solutions of
ax + by = c,
where a, b, c are given and x and y are to be determined?
- let g = (a, b). we saw a long time ago that there is a solution if and only if g|c.
- if there is one solution, there are infinitely many. Why?
- draw picture.
- Write y = f (x) = − ab x + cb
- for which integers δ is f (x + δ) also an integer? Smallest such δ is b/g.
- when x increases by b/g, y decreases by a/g,
- conclusion: given one solution (x0 , y0 ), the other solutions are given by
(x0 + kb/g, y0 − ka/g),
where k ranges over all integers.

2. Many Linear Equations


Now we consider the case of a sytem of m linear equations with integer coefficients
in n unknowns x1 , . . . , xn , such as

a1,1 x1 + . . . + a1,n xn = b1
a2,1 x1 + . . . + a2,n xn = b2
.. ..
. .
am,1 x1 + . . . + am,n xn = bm
Our method of solution is similar to that of a linear algebra class - we use rwo
and column operations. But since we work only with integers, we have to restrict
slightly the row operations that are allowed. Specifically, we can do the following:
(1) (R1) Add m times one row to another row (here m must be an integer!)
(2) (R2) Interchange two rows
(3) (R3) Multiply one row by negative one (not just any integer!)
1
2 JAMES MCIVOR

Similarly, we have the following column operations:


(1) (C1) Add m times one column to another column (m an integer!)
(2) (C2) Interchange two columns
(3) (C3) Multiply one column by negative one (not just any integer!)
These row and column operations are more limited, since our scalars must be
integers. Nevertheless, we have the following powerful theorem:
Theorem 1 (Smith Normal Form). If A is any m × n integer matrix, then there
is an invertible m × m matrix L and an invertible n × n matrix R such that
D = LAR,
where D is an m × n matrix that is “diagonal” (although not necessarily square,
meaning that di,j = 0 if i 6= j.
Proof. (Sketch) First we note that row and column operations can be expressed as
multiplication by some invertible matrix. So it suffices to show that we can reduce
A to this “diagonal” form by row and column operations.
- switching the columns around if necessary, we may assume the first column is
nonzero.
- switching rows around if necessary, we can assume the first entry of this column
is nonzero, and has smallest absolute value out of all the nonzero entries in that
column.
- multiply the first row by -1 if necessary to make the 1,1 entry positive
- the division algorithm shows that by adding appropriate multiples of the first
row to the other rows, we can make all the entries beneath the first one in this first
column zero.
- now move on to the second column. Repeat the above procedure without
touching the first row.
- keep on doing this until you have an upper triangular matrix.
- now do column operations in the same spirit to make it diagonal.
- note that unlike when working over a field (R, for example), we may not be
able to ensure that the diagonal entries are all 1.


In fact, with a little more care, we can arrange it so that the diagonal entries
d1 , d2 , . . . of D satisfy the divisibility relations d1 |d2 , d2 |d3 , etc., and having done
this, the matrix D is unique. But we won’t need this uniqueness, so I omitted it
from the statement of the theorem.
- Why do we care? This allows us to solve the system of linear equations above!
- Here’s how: Write the system of linear integral equations in matrix form:
Ax = b
where x is the n × 1 column vector of the variables x1 , . . . , xn , and b is the m × 1
column vector of the numbers b1 , . . . , bm .
- Write the smith normal form (SNF) of A as D = LAR. Then set y = R−1 x
(possible since R is invertible), so x = Ry, and set c = Lb.
- Then the equation Ax = b is equivalent to Dy = c.
- then we have the following useful result, which is immediate by the invertibility
of L and R:
MATH 115, SUMMER 2012 LECTURE 23 3

Theorem 2. With notation as above, the equation Ax = b has a solution in integers


if and only if the equation Dy = c has a solution in integers. Letting the diagonal
entries of D be d1 , . . . , dr , and the entries of c be c1 , . . . , cm , this happens if and
only if di |ci for i = 1, . . . , r, and ci = 0 for i > r.

- There are two ways the system may fail to have a solution:
- first, it may be inconsistent, even over R - this happens when some ci 6= 0 for
i > r.
- second, when working over the integers we have an additional problem, of di-
visibility. For instance, the first row of our “diagonal” system could be 3y1 = 2,
which is OK over R, but has no solution over Z.

- note also that if there is a solution, then two things can happen:
1) r = n, and the solution is unique, or
2) r < n, and then there are infinitely many integer solutions, coming from the
free variables yi for i > r.

3. How to Actually Compute the SNF


I find the book’s treatment of this procedure a little confusing: here’s what I
recommend you do:

(1) Write down Im AIn , where Im is the m × m identity matrix


(2) Perform your row and column operations on A
(3) Every time you do a row operation, do it also to the left matrix Im
(4) Every time you do a column operation, do it also to the right identity
matrix In
(5) Eventually the middle matrix will be your diagonal matrix D
(6) The matrix on the left is L, the matrix on the right is R
(7) The solution depends on D and c, so compute c = Lb
(8) Now check whether D and c satisfy the conditions in the theorem.
(9) If no, you’re done, if yes, get your solution y, and then compute x = Ry

4. An Example
Find all integer solutions to the system of equations

2x1 + x2 − 3x3 − x4 = 10
x1 − x2 − 3x3 + x4 = 2
4x1 − 4x2 + 16x4 = 20

Solution
4 JAMES MCIVOR

We set
 
2 1 −3 −1
A= 1 −1 −3 1 
4 −4 0 16
 
x1
 x2 
x=
 x3


x4
 
10
b= 2 
20
Do the prescribed operations (computations omitted) - you get
 
1 0 0 0
D= 0 3 0 0 
0 0 12 0
 
0 1 0
L =  1 −2 0 
0 −4 1
 
1 1 2 −2
 0 1 −1 2 
R=  0 0 1 −1 

0 0 0 1
so  
2
c = Lb =  6 
12
Since 1|2, 3|6, and 12|12, we have a solution. It’s not unique, since here r = 3 <
4 = n. The solution for y is  
2
 2 
y=  1 ,

k
where y4 = k can be any integer, which gives
 
6 − 24
 1 + 2k 
x = Ry =   1−k 

You might also like