# Math 221 Spring 1998 Computer Assignment 3

due Thursday April 16

Problem 1

a)
The general equation of a circle is x2+y2+ax+by+c=0 (or equivalently d(x2+y2)+ax+by+c=0 with .) Given this, show that the equation of a circle through the points (x1,y1), (x2,y2), and (x3,y3) is given by

as long as the coefficient of x2+y2 (when this determinant is expanded) is not zero. HINT: The most direct way to do this problem is to show that the determinant condition expands to the equation of a circle, and that the three points actually lie on this circle.

It is also possible to derive this equation (and many useful others ...) by writing down a related homogeneous square system of linear equations with a nontrivial solution, and thinking about what that says of the determinant of the associated matrix. But you don't need to do that derivation.

b)
Using the determinant of part a), find the equation of the circle through the points (1,2), (3,4), and (5,5). Note that the Maple command
                   A:= stack(v1,v2,v3,v4)

may be used to construct a matrix A with rows v1, v2, v3, and v4.
c)
Try to use this procedure to determine the circle through (1,2), (3,4), and (5,6). Explain algebraically and geometrically why any difficulties you run into arise. (The algebraic explanation should include the vanishing of a certain determinant ....)
d)
Generalize the method of part a) using determinants to find a conic section ax2+bxy+cy2+dx+ey+f=0 though the points (1,2), (3,4), (5,6), (7,9), and (9,11).

Problem 2

a)
Suppose that a 2 x 2 matrix A has 2 linearly independent eigenvectors and with respective eigenvalues and . Suppose that a vector can be written as . Give a formula in terms of this data for the n'th power of A acting on , namely .
b)
If and , explain why the direction of will approach that of as the power n gets large.
c)
The Maple below implements this power method for trying to find a unit eigenvector corresponding to the eigenvalue of largest absolute value.
                A:= matrix(2,2,[[-1,3],[-2,4];])
w := vector([1,0]);
for i from 1 to 10 do
w := evalm(A &* w);
w_len := evalf(sqrt(dotprod(w,w))):
w := map(evalf,evalm(1/w_len * w)):
print(w):
od:

( You can use the key option-return instead of return to insert a new line without generating a Maple prompt. )
Using the initial vectors and , check whether the power method as above seems to be approaching an eigenvector of the matrix . If so, which eigenvector ? How long does each take to compute a unit eigenvector to two decimal places ?
d)
Use the initial vector . Explain why your result differs from part c) above.. Will the power method produce an eigenvector in this case ?
The method is readily generalized to n x n matrices.

For problem 3 you may wish to use the following Maple commands (on top of the ones you already know).

B :=submatrix(A, [1,2], [2,3]); (B is the respective sub-matrix of A)
nullspace(A); (calculate the null-space of matrix of A)
rank(A); (calculate the rank of matrix of A)
charpoly(A,lambda); (calculate the characteristic polynomial of matrix of A in the unknown )
solve(pol=0,x);(find the roots of the polynomial pol with respect to the unknown x)

Problem 3

Consider the matrix

where .

a)
Find the characteristic polynomial of A and the eigenvalues as its roots.

Clearly the dimension of the eigenspace to the eigenvalue -2 is at least one. It is the purpose of what follows to find conditions on a, b and c so that this eigenspace has dimension two or dimension three.

b)
Calculate the rank of A+2I.

Note that Maple takes a,b and c to be arbitrary numbers, so that it finds that A+2I has rank two, meaning that the eigenspace of -2 is of dimension one. This should be interpreted in the following sense: The eigenspace has at least dimension one, and for typical a,b,c it has dimension exactly one''. In other words, the Maple rank command does not give you the desired conditions on a, b and c.

c)
To overcome this problem consider the top-left sub-matrix H of A+2I. Find conditions on a,b and c for when the determinant of H is zero. (If this determinant is zero the rank of A+2I can be less than two, meaning that the eigenspace of -2 can have dimension bigger than one.)

d)
Plug in the conditions on a,b and c you found in c) into the matrix A+2I one by one. This allows you to determine the exact conditions on a,b and c so that A+2I has rank one or zero, which answers the question regarding the dimension of this eigenspace of -2.

Note: This exercise illustrates that it is necessary to use a system like Maple in a smart way in order to get the desired information. In particular, it is important to have an idea of the underlying theory.