1
$\begingroup$

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?

$\endgroup$
1

2 Answers 2

2
$\begingroup$

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

$\endgroup$
1
$\begingroup$
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
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.