# Appending/Prepending a vector to a TableForm

How do i Append(Prepend) to a List?

A = {{a,b},{c,d}} // TableForm
B = {x, y}


does not work. If i leave out the TableForm it does. This could be solved by converting TableForm of a List back to a list which works:

A = {{a,b},{c,d}}
B = {x, y}


But how do i do such if A allready is in TableForm? Should i generally allways avoid outputting as TableForm if the structure contains data?

MapAt[MapThread[Prepend, {#, B}] &, A, {1}]


First of all you should define A without //TableForm

A = {{a,b},{c,d}}
B = {x, y}
Transpose[Join[{B},A]] (* or Thread[Join[{B}, A ]]*)
(*{{x, a, c}, {y, b, d}}*)

• This circumvention of the issue was allready mentioned in the question. I looked for a solution which does this on TableForms etc. I was able to solve it myself after having posted the question hence i answered myself. – Gladaed Dec 13 '18 at 16:46
• Sorry for trying to give you a helpful answer. – Ulrich Neumann Dec 13 '18 at 16:51
• @Gladaed You are going to make yourself very unhappy by sticking to wrapping things into TableForm. – Henrik Schumacher Dec 13 '18 at 17:39

I just found a solution myself:

AList = A[[1]]


and hence

A = {{a,b},{c,d}} // TableForm
B = {x, y}