Matrices, Vectors, and 3D Math

Scott Stevens




Matrices, Vectors, and 3D Math

Matrices, Vectors, and 3D Math:
A Game Programming Approach with MATLAB®
Scott Stevens – Champlain College

ISBN-10: 0-9842071-8-X
ISBN-13: 978-0-9842071-8-3
254 Pages
©2012 Worldwide Center of Mathematics

Digital PDF | $9.95 go >
Print BW | $29.95 go >

View this book on MathWorks go >


Written for undergraduate students, Matrices, Vectors, and 3D Math: A Game Programming Approach with MATLAB provides a resource to learn standard topics in linear algebra and vector calculus in a single course within the context of game programming applications and projects. Topics presented in this text are constructed to enable students to succeed after completing a single college-level calculus course.  

MATLAB is used to solve numerous examples in the book. In addition, a supplemental set of MATLAB code files is available for download here.



1 Introduction to Linear Algebra
1.1 Systems of Linear Equations - Row Reduction
1.2 Matrices and Vectors
1.3 Inverses and Determinants
1.4 Vector Spaces: R2 and R3
1.5 Linear Independence, Span, Basis, Dimension
1.6 Change of Basis
1.7 Matrix Transformations
Chapter 1 Project: Real-Time Collision Detection

2 Vectors and the Geometry of Space
2.1 Vectors in the Plane
2.2 Vectors in Space
2.3 The Dot Product
2.4 The Cross Product
2.5 Lines in 2D and 3D
2.6 Planes
2.7 Collision Detection and Response: Lines and Planes
Chapter 2 Project: The Separating Axis Theorem

3 Vector-Valued Functions
3.1 Vector-Valued Functions and Curves
3.2 Di erentiation of Vector-Valued Functions
3.3 Projectiles
3.4 Euler's Method
3.5 Bouncing Around in 2D
Chapter 3 Project: Projectile Game in 2D

4 Multi-Variable Functions and Surfaces
4.1 Surfaces: z = f(x; y)
4.2 Partial Derivatives, Gradients, and Normal Vectors
4.3 Bouncing Around in 3D
Chapter 4 Project: Projectile Game in 3D

A Trigonometry Review
A.1 Triangle Trigonometry
A.2 Unit-Circle Trigonometry
A.3 Trigonometry as a Collection of Periodic Functions
A.4 Translations and Transformations of Trig Functions
A.5 Circles and Ellipses
A.6 The Tangent Function
A.7 Trigonometry Review - Problem Set
B Review of Di erentiation Rules
C A Quick Guide to MATLAB®
C.1 Running MATLAB®
C.2 Creating your own functions
C.3 Graphing with MATLAB®
C.4 Input and Output with the Command Window
C.5 Input and Output with a Figure
C.6 Assignment

Detailed Solutions to Worksheets
Detailed Solutions to Selected Problems




  • The text contains standard topics in Linear Algebra followed by a selection of topics usually found in a Calculus III course including vector geometry, differential calculus, and surfaces.

  • Applications are drawn from an interesting collection of game programming objectives such as collision detection, realistic trajectories, and collision response.
  • Most applications involve graphical depictions and animations written in MATLAB®. 

  • All example code found in the text is available for student download from the associated website.  These can be used as ‘starter code’ for many of the homework assignments.

  • Homework problems consist of standard ‘pencil and paper’ problems as well as MATLAB® assignments. 

  • Detailed solutions to about half of the homework problems are presented in the back of the student version - not just the answers.

  • There is an appendix for trigonometry review with a collection of homework problems.

  • There is an appendix for using MATLAB® which includes a simple project to get students started using the software along with starter code for the project. 

  • Each instructor gets a full electronic PDF copy of the student version for presentation purposes.
  • Each instructor gets a full PDF copy of an instructor’s version, which has detailed solutions to all homework problems inserted within the text.

  • Instructors can also receive the MATLAB® code for answers to all of the problems requiring it.  




Web Technology Pages:

MATLAB® files are available for each chapter:



Scott Stevens
Scott Stevens is an Associate Professor of Mathematics and Statistics at Champlain College. He spent the early part of his career teaching upper level and graduate courses in mathematics and statistics while researching nonlinear dynamics in the context of biological fluid dynamics. For the past 5 years he has been teaching statistics and other introductory math courses to non-math majors. Outside of teaching, he continues to do research involving the analysis of large data sets for intracranial pressure dynamics of traumatic brain injury patients at Fletcher Allen Hospital in Burlington, Vermont.