# Naming variables with same number of subscripts

I have a very stupid question.

I am writing a LaTeX document with a complex mathematical model and I'm running out of letters and symbols. I also don't want to keep adding more and more \hat{}'s and \tilde{}'s if it's unnecessary, as those also have other meanings in my model.

I want different sets of objects that have subscripts belonging to different sets to have the same name and number of subscripts; but I don't want there to be any confusion.

Suppose my original variable is $X_{a,b} \quad\forall a\in A,b \in B$, and I define $X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$, and $X_b = \sum_{a \in A}X_{a,b} \quad\forall b \in B$.

Now we know $X_{a,b}$ is quite different from $X_a$ and also from $X_b$ because the number of subscripts is different. But what about $X_a$ from $X_b$? Can we know they are different because the subscript is $a \in A$ versus $b \in B$? Or do I need to explicitly qualify them as being different by having something like $\hat{X}_a$ and $\tilde{X}_b$ or $X_a^{(A)}$ and $X_b^{(B)}$?

At the end of the day, $A$ and $B$ are just numbers - so even though conceptually they are very different objects, they still end up just been integer subscripts of $X$.

I could say $X_c$ or $X_1$ and then I wouldn't know which $X$ I'm talking about unless I explicitly qualify $c \in A$ or $c \in B$, and I would need to replace $X_1$ with $X_{B_1}$, for example.

• If it is an option, you could use latin letters for the first index and greek letters for the second, like $X_{a,\beta}$, $X_a$ and $X_\beta$, with $a\in A$ and $\beta \in B$. – A.P. Mar 20 '13 at 19:19

If the variable is $internal$, then you can name it anything you want.

An example is $b$ in "$X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$".

As for the number of subscripts problem, usually $X_a$ will have some relation to $X_{a, b}$, but it doesn't have to as far as I am concerned. The fact that the number of subscripts is different means, to me, that the objects are of different type.

As to your having to distinguish "$X_a = \sum_{b \in B}X_{a,b} \quad\forall a\in A$" and "$X_b = \sum_{a \in A}X_{a,b} \quad\forall b \in B$", I would have an indication as to which subscript is constant, so that I would write, for example, "$X_a^{(1)}$" and "$X_b^{(2)}$" or "$_{1}X_a$" and "$_2X_b$".

I agree with you about the problem with the notation $X_a$ and $X_b$. So, what is a solution....

Of course the first thing that comes to mind is to change $X_a$ and $X_b$ to $W_a$ and $W_b$ or some such.

You could use something like $X_{a,\cdot}$ and $X_{\cdot,b}$ ... although that looks more like fill-in-the-blank than a total.

What about $X_{a,\Sigma}$ and $X_{\Sigma,b}$?

• Not really, the example I gave was just to illustrate how a the two single-sub $X$'s are related, but are collapsed over different objects. In my actual model the relationship is similar but more complex. Both your suggestions are not useful in my case. I basically just want to know if it's okay to have two different variables with the same number of subscripts as long as it's qualified that the subscripts are different in both cases. – Conrad314159 Mar 20 '13 at 0:38
• Well, okay is as okay does. By which I mean, whether it presents an obstacle to the reader or not is the bottom line - and that's subjective. I think if you're willing to add enough extra words at times, it'd probably be tolerable. – Greg Martin Mar 20 '13 at 2:53