The Human Matrix

Sarah Patterson, Virginia Military Institute, Applied Math

Blain Patterson, Virginia Military Institute, Applied Math

Author Profile
Initial Publication Date: September 21, 2022

Summary

For this activity, we will look at accessing data in a matrix and manipulating it. Students will again be arranged into several rectangular arrays. Each student will have a whiteboard to write down their assigned value as various matrix operations are projected in class. As a group, students will need to communicate to determine which values change and what value they will have. Students will update their values on whiteboards accordingly.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

The main learning objectives for this activity include (1) understanding variable definitions, (2), indexing matrices and vectors, (3) extracting data from a matrix, and (4) operating on data from a matrix.

Context for Use

This classroom activity should be done in an introductory programming course and is best suited for smaller classes (less than 30 students). This can be done early in the semester, as it requires very few prerequisite programming skills. Students need to be familiar with basic MATLAB commands that extract and operate on data from a matrix. Although this activity was designed to be done at the beginning of the semester, the instructor may include more advanced examples if they wish to implement this later in the semester.

Description and Teaching Materials

Directions

For this activity, we will look at not only accessing data in a matrix but also manipulating it.

1. Define the following matrices by having students sit arranged like the elements of the matrix. Each student has a whiteboard and marker to write down their initial value.

B=zeros(2,2)
C=eye(2)
D= ones(2,1)
E=3

The following commands will be shown on various slides, which display several matrix operations. Students will update their values accordingly or make an error buzzer noise if the operation is not valid.

Commands
B=B'+2*C
D=D-2*C(:,2)
B(2,1)=B(2,1)+E
E=B(4)-C(3)*D(2)
C=B.^E
C=C+E
D=D*B

HumanMatrix.pdf (Acrobat (PDF) 70kB Sep12 22)

Teaching Notes and Tips

This is a straightforward activity that should not require too much additional planning. As with many tasks and activities, it is important to set clear expectations before you begin. For example, make sure that you encourage collaboration and willingness to participate so that students do not feel uncomfortable sharing their responses on the whiteboards with the class. These expectations should be set on the first day of class, but it helps to reiterate them before an activity such as this. This is a rather brief activity, so be sure to plan something additional for this day of class. It is recommended that you begin class with this activity and then transition into some indexing and data manipulation problems using MATLAB.


Assessment

Since this is a short in-class activity, no summative assessment is necessary. However, it is easy to do a formative assessment of student understanding of variable definitions, indexing matrices and vectors, extracting data from a matrix, and operating on data from a matrix based on their participation in this activity. It is also recommended that you survey students to capture their perceptions of such activities. Note that this can be done directly following the task or after a series of tactile activities.