Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given two matricies A and B of equal dimensions what notation should be used to express elementwise addition, subtraction, multiplication, and so on?

share|improve this question

2 Answers 2

$$\textbf A=\textbf A_{n\times n}=\begin{pmatrix}a_{1,1}&\dots&a_{1\times n}\\\vdots&\ddots&\vdots\\a_{n\times1}&\dots&a_{n\times n}\end{pmatrix},\qquad\textbf B=\textbf B_{n\times n}=\begin{pmatrix}b_{1,1}&\dots&b_{1\times n}\\\vdots&\ddots&\vdots\\b_{n\times1}&\dots&b_{n\times n}\end{pmatrix}$$

Element-wise addation $$\textbf A +\textbf B=\begin{pmatrix}a_{1,1}+b_{1,1}&\dots&a_{1\times n}+b_{1\times n}\\\vdots&\ddots&\vdots\\a_{n\times1}+b_{n\times1}&\dots&a_{n\times n}+b_{n\times n}\end{pmatrix}$$

Element-wise subtraction $$\textbf A -\textbf B=\begin{pmatrix}a_{1,1}-b_{1,1}&\dots&a_{1\times n}-b_{1\times n}\\\vdots&\ddots&\vdots\\a_{n\times1}-b_{n\times1}&\dots&a_{n\times n}-b_{n\times n}\end{pmatrix}$$

Element-wise multiplication $$\textbf A \circ\textbf B=\begin{pmatrix}a_{1,1}\times b_{1,1}&\dots&a_{1\times n}\times b_{1\times n}\\\vdots&\ddots&\vdots\\a_{n\times1}\times b_{n\times1}&\dots&a_{n\times n}\times b_{n\times n}\end{pmatrix}$$

share|improve this answer
This is Matlab notation. –  copper.hat Nov 9 '12 at 7:43
The notation $(A+B)_{ij} := a_{ij}+b_{ij}$ seems to be way more common, at least from my experience. –  roman Nov 9 '12 at 8:35

Addition (+) and subtraction (-) are already elementwise by definitions, and the elementwise multiplication of two matrices is the Hadamard product, denoted by $\circ$.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.