# How to obtain a variable in terms of another variable?

I'm new to Mathematica and would like to ask a question about equation systems. I have a linear equation system given in the link. I would like to obtain kappa1 in terms of psi1, kappa2 in terms of psi2, w1 in terms of psi1 and w2 in terms of psi2. Is there a way to manipulate this system ? You can make a partition such as follows

M = Table[Subscript[a, i, j], {i, 1, 4}, {j, 1, 6}]
X = {Subscript[\[Psi], 1], Subscript[\[Kappa], 1], Subscript[w, 1],Subscript[\[Psi], 2], Subscript[\[Kappa], 2], Subscript[w, 2]};
X1 = {Subscript[\[Kappa], 1], Subscript[w, 1], Subscript[\[Kappa   2],Subscript[w, 2]};
X2 = Complement[X, X1]


and then solve for X1

Solve[M1.X1 + M2.X2 == 0, X1]


but the quick method is

Solve[M.X == 0,X1]


With

A = Array[a, {4, 6}];


you can solve the euations A.{\[Psi]1, \[Kappa]1, w1, \[Psi]2, \[Kappa]2, w2 }==0 for {\[Kappa]1, w1, \[Kappa]2, w2}

Solve[A.{\[Psi]1, \[Kappa]1, w1, \[Psi]2, \[Kappa]2, w2 } == 0, {\[Kappa]1, w1, \[Kappa]2, w2} ]


The result depends on { \[Psi]1,\[Psi]2}