Objective: Present a class of matrices that can be used to illustrate all the topics covered in a beginning linear algebra course. This demo/student project can be used as a capstone exploration.

Level: Post Calculus; linear algebra.

Prerequisites: A beginning linear algebra course. All the major topics of the course including vector spaces and eigen concepts should have been covered. Students should be familiar with the concepts of symmetric and orthogonal matrices, inverses, reduced row echelon form, null space, eigenvalues, eigenvectors, and basis for a subspace.

Platform: Any software package that includes tools for the major linear algebra computations. We present aspects of this demo/project for MATLAB, Mathematica, and Maple.

Instructor's Notes: Throughout a linear algebra course students encounter sets of matrices which are often described in one of the following ways.

Let S be the set of all m by n matrices of the form _______.

Let S be the set of all m by n matrices that have the property ________ .

For example;

S = the set of all 3 by 3 diagonal matrices.

S = the set of all 5 by 4 matrices whose row reduced echelon   form has at least one zero row.

S = the set of all nonsingular matrices.

S = the set of all n by n symmetric matrices.

In three of the preceding examples the set S contained matrices of the same size. The set of all nonsingular matrices contains square matrices of any size. Both  types of sets are used for a variety of purposes which are designed to foster acquaintance, practice, and reinforcement of abstract and unifying ideas that are the cornerstone of linear algebra. By the end of the term students have encountered many sets of matrices and (hopefully) have acquired a reasonable set of skills that encompass the areas of matrix algebra, row operations, inverses, vector space notions, spanning sets, bases, and eigen concepts. Depending upon the type of course they may also have dealt with the geometric aspects of linear algebra which provide opportunities for visualization of a number of topics. 

As instructors we want to have students draw together the topics of the course and see the interrelationships of the ideas that all too often seem to be compartmentalized as we progress through chapters of a text. One way to provide such an opportunity for student learning along these lines is to use a capstone set of exercises. These may be designed to encompass a number of topics, require that students experiment with a certain set of matrices, and quite possibly report findings by writing about properties they discover. In this regard the use of technology, namely software packages or even calculators, can be used to provide a format for experimentation. With such goals in mind an instructor needs a set of matrices that were not explored in depth previously in the course and which are fairly simple to generate and manipulate. This demo presents one such set that has been used successfully for several years with several different text books.

Definition:  A reversal matrix is a matrix obtained by writing the rows and columns of an identity matrix in reverse order.

Example 1. The 4  by 4 reversal matrix is



Reversal matrices are simple to construct in a variety of software platforms.

In MATLAB , to construct the matrix of Example 1 the following single line of code can be used.

J=zeros(4); for k=1:4; J(k, 5 – k)=1; end; J

For an n by n reversal matrix we can use the following commands:

n = __;J=zeros(n); for k=1:n; J(k, (n+1) – k)=1; end; J

where the value of n is entered in place of the underline. An m-file, rever.m, can be downloaded for further convenience.

In Mathematica, to construct the matrix of Example 1 the following code can be used. 

n = 4
J4 = Table[0,{n},{n}]

To vary n, just change the value in the first line.

In Maple, the following commands can be used to construct J4

for i from 1 to 4 do;J[i,5-i]:=1;od;

For an n by n reversal matrix we can use the following commands:

n:=___;#<== enter the size of the reversal matrix 
for i from 1 to n do; J[i,(n+1)-i]:=1;od;


The following is a sample of the type of capstone exercise set that can be used with the set of reversal matrices. These exercises are designed to be used with MATLAB, where command eye generates an identity matrix, command rref computes the reduced row echelon form, and command eig can be used to compute eigenvalues and eigenvectors. The n by n reversal matrix will be denoted as Jn. You can of course construct a number of other interesting investigations to suit your students and your course. (The sample exercises below are just pictures; click here for a word file with these exercises and click here for a pdf file of these exercises.)


For a Maple worksheet involving these exercises click on reversal.mws . For a Mathematica notebook click on reversal.nb .

An Instructional Suggestion: It may be helpful to have a class discussion about reversal matrices before assigning a set of capstone exercises. The following items could form the basis of such a discussion. 

  • Give the definition of a reversal matrix.

  • Have students explicitly list Jn for n = 2, 3, 4, and 5. 

  • Let S be the set of all reversal matrices. Ask for a description of this set; for example the number of members, is S a subspace of some vector space, or for column vector x with n entries describe the product Jnx

  • Prove that the set W = all matrices of the form kJ4 , where k is a real scalar, is a subspace of R4. What is the dimension of W? Find a basis for W. 

  • Provide an argument that every reversal matrix is diagonalizable.

Laying a foundation for the set of reversal matrices provides student with a comfort level for the topic. Of course you may have another set of introductory items that are more in tune for your course. 

Credits:  This demo/capstone project was submitted by 

David Zitarelli
Department of Mathematics 
Temple University

and is included in Demos with Positive Impact with his permission. The MATLAB m-file rever.m was written by David R. Hill. The Mathematica notebook and Maple worksheet were constructed by Lila F. Roberts.


DRH 7/15/01   Last updated 5/23/2006

Since 3/1/2002