From 95767c8588eaccc46a4b8d50df35658f3ed29367 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 22 Sep 2023 00:32:22 -0400 Subject: [PATCH] adding addition formula --- hws/03_matrix_class/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hws/03_matrix_class/README.md b/hws/03_matrix_class/README.md index bf9878c..bdfde8c 100644 --- a/hws/03_matrix_class/README.md +++ b/hws/03_matrix_class/README.md @@ -141,8 +141,9 @@ methods (not operators) that are inside the class definition, so the current Mat just one argument, a second Matrix which we will refer to as B, and modify A if the dimensions of A and B match. If the dimensions match, the functions should return true, otherwise they should return false. Addition of two matrices, C = A + B, and subtraction of two matrices, D = A − B are formally defined as: -(∀i,j |i ∈ {0, 1, . . . , m − 2, m − 1}, j ∈ {0, 1, . . . , n − 2, n − 1}) Ci,j = ai,j + bi,j -(∀i,j |i ∈ {0, 1, . . . , m − 2, m − 1}, j ∈ {0, 1, . . . , n − 2, n − 1}) Di,j = ai,j − bi,j + +![alt text](images/matrix_addition_formula.png "matrix addition formula") + Consider these two matrices: ![alt text](images/matrix_addition.png "matrix addition")