![C++ Game Development By Example](https://wfqqreader-1252317822.image.myqcloud.com/cover/625/36698625/b_36698625.jpg)
上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:
![](https://epubservercos.yuewen.com/1079FF/19470379008810206/epubprivate/OEBPS/Images/c468f514-7946-4eba-b368-667cb3009cd0.png?sign=1739027869-FOBSgwVEzT8QPFDRpVF40uJ5eNyWqU7z-0-ffa8e65cd1d53f4d82dda2f881e6366a)
Then C = A + B is given as:
![](https://epubservercos.yuewen.com/1079FF/19470379008810206/epubprivate/OEBPS/Images/02440184-6dca-4da6-9060-e379f244cfaf.png?sign=1739027869-LlkeoQFzShcIKRfhjfozxzlotJv7gcHS-0-79265b699ad169b45dcd14202545182a)
Matrix subtraction works in the same way when each element of the matrix is subtracted with the corresponding element of the other matrix.