# Notation to define a matrix in terms of its elements

I have a function $F(S_{wh})$ where $S$ is a matrix of size $w$ by $h$. I want this functions result to be a new matrix of size $w$ by $h$ where each element is defined by another expression. How do I show that it is creating a matrix of a certain size whose elements are defined by some expression?

For example if I want to create a function whose input is a matrix $M_{wh}$ which negates each element of the matrix, how do I denote that? Example of what I mean:

Input: $\begin{bmatrix}-1 & 2\\-3 & 4\end{bmatrix}$

Output: $\begin{bmatrix}1 & -2\\3 & -4\end{bmatrix}$

How would I write a function that does that and works for a matrix of an arbitrary size?

Let $\mathcal M_{mn}$ be the set of all $m\times n$ matrices with real (complex) entries. Define $F:\mathcal M_{wh}\to \mathcal M_{rs}$ by the formula $$F(A)_{ij} = \text{something with i,j,A_{kl}}$$
• So the example I added to the question would look like the following? $F(M_{wh})_{ij} = -M_{ij}$ Sep 23 '15 at 20:39
• I'd write $F(M)_{ij} = -M_{ij}$. No need to put $wh$ every time. The size of matrix does not matter for this formula, so it's enough if the context describes it. Also, for this particular function $F(M)=-M$ would express the same thing better.
• Maybe, but I prefer to introduce size in context. Formulas are not meant to be read independently of text preceding them. If the text just above the formula says that it defines a function $F:\mathcal M_{wh}\to\mathcal M_{wh}$, then the size of matrices was already described and need not be attached. Writing $M_{wh}$ is ambiguous because it could mean the $(w,h)$-entry of $M$.