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