# Show tabulated equations in matrix form [closed]

How do i put last equation, eqm[x, t, k, n] into matrix form? I want every row to end with == 0

Clear["Global*"]

n = 3;
Subscript[k, (j_)?EvenQ] = κ;
Subscript[k, (j_)?OddQ] = k;
Subscript[k, (j_)?0] = ko;
Subscript[k, (j_)?n + 1] = ko;

ue[x_, t_, k_, n_] :=
(1/2) *
Sum[
Subscript[k, j]*(Subscript[x, j - 1][t] - Subscript[x, j][t])^2,
{j, 1, n + 1}];

te[x_, t_, n_] :=
(1/2)*m*Sum[Derivative[1][Subscript[x, j]][t]^2, {j, 1, n}];

lg[x_, t_, k_, n_] := te[x, t, n] - ue[x, t, k, n];

eqm[x_, t_, k_, n_] :=
Sum[D[lg[x, t, k, n], {Subscript[x, j][t], 1}], {j, 1, n}] -
Sum[D[D[lg[x, t, k, n], {Derivative[1][Subscript[x, j]][t], 1}],
{t, 1}], {j, 1, n}];

MatrixForm[eqm[x, t, k, n]] == MatrixForm[0]


I want it to look like this but with zero on the other side

For n = 3 It should look like this:

I tried array, but I'm bad at such stuff! I was able to do it correctly some time ago. It was short. Unfortunately, I deleted some files, so I lost the correct code.

## closed as unclear what you're asking by Henrik Schumacher, MarcoB, m_goldberg, Alex Trounev, Carl LangeApr 4 at 12:28

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• why you vote down !? This is regular question! – Alrubaie Apr 2 at 14:27
• The output of eqm[x, t, k, n] is a single equation. What do you mean by "putting it in matrix form"? Also, avoid subscripts if you can; they tend to complicate expressions needlessly. You will also notice that MatrixForm[0] doesn't really make much sense. Show us an example of the output you seek. – MarcoB Apr 2 at 14:29
• check now i edit added a pic – Alrubaie Apr 2 at 14:36
• duplicate of mathematica.stackexchange.com/q/194153 ? – Roman Apr 2 at 14:37
• every j in the sum in eqm generate a dimension and row for the matrix. how using array and tables can i sort them put them finally in matrix form. i did it sometime ago but deleted some old files so i got lost ! – Alrubaie Apr 2 at 14:38

q1 = Table[eq[x, t, k, n][[j]], {j, 1, n}] // Simplify
`