author

Kien Duong

January 29, 2023

Matrix addition

1. Addition of 2 matrices

Matrix addition is the operation of adding two matrices by adding the corresponding entries together. Given two matrices A, B that must have an equal number of rows and columns (m×n).

[A]+[B]=[a11a12a1na21a22a2nam1am2amn]+[b11b12b1nb21b22b2nbm1bm2bmn]=[a11+b11a12+b12a1n+b1na21+b21a22+b22a2n+b2nam1+bm1am2+bm2amn+bmn]

A+B=Ccij=aij+bij

For example

[123456]+[061230]=[184686]

2. Subtraction of 2 matrices

Similarly, we can also subtract one matrix from another, as long as they have the same dimensions.

[A][B]=[a11a12a1na21a22a2nam1am2amn][b11b12b1nb21b22b2nbm1bm2bmn]=[a11b11a12b12a1nb1na21b21a22b22a2nb2nam1bm1am2bm2amnbmn]

AB=Ccij=aijbij

For example

[123456][061230]=[142226]

Recent Blogs