1

I want to use Subscripts to prettify a matrix and started the following way

Subscript[a, bb] // TraditionalForm
Subscript[a, b,b] // TraditionalForm
Subscript[Subscript[a, b], b] // TraditionalForm

The results are $$ a_{bb}\\ a_{b,b}\\ a_{b_b} $$ I want to use the first type.

But, I need to create the Subscript $a$ with elements from a list, like so

list = {b,c,d};
Subscript[a, list[[1]] list[[1]]] // TraditionalForm
Subscript[a, list[[1]], list[[1]]] // TraditionalForm
Subscript[Subscript[a, list[[1]]], list[[1]]] // TraditionalForm

Then, the result is $$ a_{b^2}\\ a_{b,b}\\ a_{b_b} $$

Sticking with the first type; So, How do I prevent that $b^2$? Or, how do I erase the comma from second output?

Sektor
  • 3,320
  • 7
  • 27
  • 36
Hojin Cho
  • 153
  • 4

2 Answers2

2

I think you want Row:

Subscript[a, Row@{b, b}]

abb

Consider also Indexed but beware that it is not an inert (formatting) function.

Indexed[a, {b, b}]

abb

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
1
list = {"b", "c", "d"};
Subscript[a, list[[1]] <> list[[1]]] // TraditionalForm

or

list = {b, c, d};
Subscript[a, ToString[list[[1]]] <> ToString[list[[1]]]] // TraditionalForm
David G. Stork
  • 41,180
  • 3
  • 34
  • 96