Reader small image

You're reading from  Game Physics Cookbook

Product typeBook
Published inMar 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787123663
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Gabor Szauer
Gabor Szauer
author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer

Right arrow

Multiplication


Like a vector, there are many ways to multiply a matrix. In this chapter we will cover multiplying matrices by a scalar or by another matrix. Scalar multiplication is component wise. Given a matrix M and a scalar s, scalar multiplication is defined as follows:

We can also multiply a matrix by another matrix. Two matrices, A and B, can be multiplied together only if the number of columns in A matches the number of rows in B. That is, two matrices can only be multiplied together if their inner dimensions match.

When multiplying two matrices together, the dimension of the resulting matrix will match the outer dimensions of the matrices being multiplied. If A is an matrix and B is an matrix, the product of AB will be an matrix. We can find each element of the matrix AB with the following formula:

This operation concatenates the transformations represented by the two matrices into one matrix. Matrix multiplication is not cumulative. . However, matrix multiplication is associative...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Game Physics Cookbook
Published in: Mar 2017Publisher: PacktISBN-13: 9781787123663

Author (1)

author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer