![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=1739273358-LyHoh7APUhRtjwYczELK1Aq9FpBLMZT7-0-66fd9bc38b427c824ed09c4a5c59315d)
Then C = A + B is given as:
![](https://epubservercos.yuewen.com/1079FF/19470379008810206/epubprivate/OEBPS/Images/02440184-6dca-4da6-9060-e379f244cfaf.png?sign=1739273358-rxW7TnorazrDoic2b7yiEFWxTJ8wp6Uu-0-3c888dc4a55f7df6e31cdb8584837ba0)
Matrix subtraction works in the same way when each element of the matrix is subtracted with the corresponding element of the other matrix.