# Elements inside arrays seem to be strings rather than signed numbers

When I have code like

b = Array[Subscript[be, #] &, {3, 1}]
b = b /. {Subscript[be, k_] :> Subscript[-be, k] /; k > 1}


I am noticing that Mathematica does not accept the new element as a signed number, i.e., negative be but rather as a string object. Is there a way to fix this?

For example, the following code generates an error then when I am solving for Subscript[be, 2] but not when I solve for Subscript[-be, 2] which tells me that Mathematica looks at this more like a string than a number.

(m = Array[Subscript[a, ##] &, {3, 3}]) // MatrixForm
m = m /. Subscript[a, i_, j_] :> Subscript[a, j, i] /; j < i
b = Array[Subscript[be, #] &, {3, 1}]
b = b /. {Subscript[be, 1] -> 1,
Subscript[be, k_] :> Subscript[(-1)*be, k] /; k > 1}
p = Transpose[b].m.b
Solve[p == 0, Subscript[be, 2], Complexes]

• If you are going to be spending a lot of time with matrices in Mathematica, you should probably stop using the Subscript function. This is mostly a formatting function (like MatrixForm) and will cause no end of grief. – bill s Feb 28 '15 at 17:40
• Thanks @bills I agree it is painful. I solved it and wrote an answer. – Hirek Feb 28 '15 at 18:03
• I think what bills is trying to say is that instead of using Subscript[a, ##] you should use a[##]. It doesn't look as nice, but subscripts are really annoying to use in Mathematica, and should ideally be avoided. – DumpsterDoofus Feb 28 '15 at 18:20
• The most most part I agree with bill, but why are you using Subscript[-be, k] rather than -Subscript[be, k]? – Mr.Wizard Feb 28 '15 at 18:28
• Yeah, that's what I wrote in my answer. I am using the output to study the structure of the problem so I need it to be as humanly legible as possible. – Hirek Feb 28 '15 at 18:40

b = b /. {Subscript[be, 1] -> 1,