C++ Game Development By Example
上QQ阅读APP看书,第一时间看更新

Matrix Addition and Subtraction

Consider the following two A and B matrices. Both of these are of the size as 3x3, shown as follows:

Then C = A + B is given as:

Matrix subtraction works in the same way when each element of the matrix is subtracted with the corresponding element of the other matrix.