Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|cite|improve this question

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

share|cite|improve this answer

$$\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|cite|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

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.