# What's the best syntax for defining a matrix/tensor via its indices?

This is a question about math notation. The context is, I'm trying to correctly define a problem of scheduling the flow through a set of devices, $D = \{d_1, d_2, ... d_n\}$, over a finite discrete future planning horizon $T$ = $(1,2,3\dots,60)$. The schedule of all devices over the planning horizon can be described by a real valued matrix, $Q$, with $|D|$ rows and $|T|$ columns. To define $Q$ I could state just that. But given a definition of $D$ and $T$ which form the "index sets", or just "indices" of matrix, to define $Q$ could/should I just say "Let $Q = D \times T \rightarrow \mathbb{R}$", or something else that is more succinct and direct than "Let $Q$ be a matrix with $|D|$ rows and $|T|$ columns"?

• This depends a bit on the intended audience. Sometimes having a super technical definition isn't as useful as a more clear but less precise one. Perhaps the shortest commonly used notation would be $Q\in\mathbb{R}^{|D|\times|T|}$ (or $Q\in\mathbb{R}^{m\times n}$ if you defined $m$ to be the size of $T$). Jan 16, 2019 at 4:06

If not, you might as well just define a function $$f:D \times T \rightarrow \mathbb{R}$$ where $$f(d_i, t)$$ is the flow through device $$d_i$$ at time $$t$$. And you might want to think about whether your domain is really the whole of $$\mathbb{R}$$. For example, can flow values be negative ?