## A Linear Algebra Project on Circles in Space

### in "Resources for Teaching Linear Algebra," Carlson, et. al., MAA, 1997, pages 59-70.

This project asks students to decide if a collection of points in space do or do not lie on a circle. The project is accessible to linear algebra students who have studied Gram-Schmidt orthogonalization and the application of linear algebra to least squares regression. Several pedagogical aspects of the project are discussed including two successful approaches for the solution of the problem.

Matlab code for generating data points is appended below.

Download the paper in PDF (Acrobat) format.
If you cannot use a PDF document, send email to cowen@math.purdue.edu

To get a copy of the programs that create the data use your browser to save a (text file) copy of the source for this page.
```
%             Random Circle in Space

%
%  CirclePts.m
%   This script generates 10 points on a random circle in space;
%   the points, the radius and center of the circle, and the normal to
%   the plane of the circle are saved in the 13 x 3 matrix CircleData.
%   The points are arranged by rows in the top 10 x 3 submatrix,
%   the center is the 11th row, the normal to the plane of the circle
%   is the 12th row, and [radius  0  0]  is the last row.
%   The radius is between 2 and 5 and each component of the center
%   is a random variable with mean 1 and standard deviation 3.
%   Copyright Carl C. Cowen, 1995.  Permission is given for instructional
%   use, but publication requires prior written consent of the author.
%
theta=6.2832*rand(1,10);
[rot s]=qr(randn(3,3));
ctr=3*rand(3,1) + ones(3,1);
CircleData=(rot*[circ [0 0 0;0 0 0;0 1 0]]+[diag(ctr)*ones(3,11) ...
[0 rad;0 0;0 0]])'

%           Random Ellipse in Space

%
%  EllipsePts.m
%   This script generates 10 points on a random ellipse in space;
%   the points, the center of the ellipse, and the normal to the
%   plane of the ellipse are saved in the 12 x 3 matrix EllipseData.
%   The points are arranged by rows in the top 10 x 3 submatrix,
%   the center is the 11th row, and the normal to the plane of the
%   ellipse is the 12th row.  The length of the major axis of the
%   ellipse is between 4 and 10 and each component of the center
%   is a random variable with mean 1 and standard deviation 3.
%   Copyright Carl C. Cowen, 1995.  Permission is given for instructional
%   use, but publication requires prior written consent of the author.
%
theta=6.2832*rand(1,10);
SMaxis=(3*rand(1)+2);
ellps=SMaxis*[cos(theta); .85*sin(theta); zeros(1,10)];
[rot s]=qr(randn(3,3));
ctr=3*rand(3,1) + ones(3,1);
EllipseData=(rot*[ellps [0 0;0 0;0 1]]+[diag(ctr)*ones(3,11) ...
[0;0;0]])'

%            Random Bent Circle in Space

%
%  BentPts.m
%   This script generates 8 points on a random circle in space
%   and 2 points that are nearly on, but not on, the circle;
%   the points, the radius and center of the circle, and the normal to
%   the plane of the circle are saved in the 13 x 3 matrix BentData.
%   The points are arranged by rows in the top 10 x 3 submatrix,
%   the center is the 11th row, the normal to the plane of the circle
%   is the 12th row, and [radius  0  0]  is the last row.
%   The radius is between 2 and 5 and each component of the center
%   is a random variable with mean 1 and standard deviation 3.
%   Copyright Carl C. Cowen, 1995.  Permission is given for instructional
%   use, but publication requires prior written consent of the author.
%
theta=5*rand(1,8);