Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can do


to create a symbol foobar. How to create a symbol $\theta_1$?

Symbol[Subscript[\[Theta], 1]]

doesn't work.

share|improve this question
Subscript[\[Theta], 1] = 20 works. – drN Oct 27 '12 at 17:27
I know; Do this fact help answer the question? Or do you mean define the symbol by assigning a value? How to create the symbol without having to assign it an arbitrary value at the same time? – qazwsx Oct 27 '12 at 17:34
I could create a symbol without assigning a value to it with Subscript[\[Theta], 1]. Beyond that I am unsure what you want to do with the symbol. – drN Oct 27 '12 at 17:40
Have you seen this?:… – DavidC Oct 27 '12 at 17:44
How about the Notation package? – Sjoerd C. de Vries Oct 27 '12 at 18:23
up vote 9 down vote accepted

Although your question is stated clear, I'm still wondering whether you understood, that Subscript[\[Theta], 1] is not a symbol. It's a box-structure! Therefore, what you do when you assign it a value like

Mathematica graphics

is, that you don't assign a value to some indexed variable x. No, you assign a value (a DownValue) to Subscript

Mathematica graphics

Let's assume I can guess that you like to use some indexed variable in your code then you should consider to work with the Notation package as already pointed out in the comments.

You can, after loading the Notation package, define a symbol like pattern which you want to use for a indexed variable. So for instance

Mathematica graphics

Note, that the parameter is x subscript Blank[]!

Symbolize[ParsedBoxWrapper[SubscriptBox["x", "_"]]]

If you now look at InputForm[Subscript[x, 1]] you see, that the notation package transforms this into valid symbol-name only consisting of letters

Mathematica graphics

At this point you could use ToExpression to define a vector

Table[ToExpression["Subscript[x, " <> ToString[i] <> "]"], {i, 10}]

and the moment you evaluate this you have your new variables

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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