How to treat Rule as an equality/equation

Hi guys,

I am trying to solve a set of equations which have matrices (The code for that is at the bottom). Solutions are of this form

{{k[1][2] -> 1 - k[1][1], k[2][2] -> 1 - k[2][1]}}
{{k[1][2] -> -3 + k[1][1], k[2][2] -> 3 + k[2][1]}}

Is there any way I can re-use these solutions to convert them in the form of equations as k[1][2]= 1 - k[1][1], as I intend to use these linear equation further for solving under constraints using Reduce:

Reduce[{Sol1[[1, 1]] && Sol1[[1, 2]] && Sol2[[1, 1]] && Sol2[[1, 2]] && 0.9 <= m11 <= 1.1 && 0.9 <= m22 <= 1.1}, {k[1][1], k[1][2],  k[2][1], k[2][2]}] 

but as: {{k[1][2] β†’ 1 - k[1][1], k[2][2] β†’ 1 - k[2][1]}} or {{k[1][2] β†’ -3 + k[1][1], k[2][2] β†’ 3 + k[2][1]}} these are rules not equations, therefore I am unable to solve them automatically by excessing in this way β€œSol1[[1, 1]]”. Is there any way I can treat these rules β†’ as equations so that I can further use it for Reduce procedure?
(you can copy paste the bellow code to execute).

Thanks
Usman

ClearAll;
K=Table[k[i][i],{i,1,2},{j,1,2}];
M=Table[m[i][i],{i,1,2},{j,1,2}];
Psi=Table[psi[i][i],{i,1,2}];
m[1][2]=0;
m[2][1]=0;
M//MatrixForm;
Psi//MatrixForm;

Sol1=Solve[K.Psi==(W^2*M).Psi/.{W->Sqrt[1],psi[1]->1,psi[2]->1,m[1][1]->1,m[2][2]->1},{k[1][1],k[1][2],k[2][1],k[2][2]}]
Sol2=Solve[K.Psi==(W^2*M).Psi/.{W->Sqrt[3],psi[1]->1,psi[2]->-1,m[1][1]->1,m[2][2]->1},{k[1][1],k[1][2],k[2][1],k[2][2]}]

[/i][/i][/i][/i][/i][/i]

In[1]:= rules = {a -> b, {c -> d, e -> f}};
        Equal @@@ Flatten[rules]

Out[1]= {a == b, c == d, e == f}

Awsome, thats good. Do it has any upper bound ? or I can convert hundreds or rules into equations using this structure?

how does @@@ it works ? If i put @@ it simply equates the 2 roots of the same list of solutions if I put @ it returns me TRUE, what is the logic and semantic behind using it in three different ways.

You can try replacing Rule->Equal

a β†’ 1 /. Rule β†’ Equal
a==1

Hey,

After doing some operation I have a list (named as β€œfinal”) which have solutions. Some solutions are less then -1*10^(-10) just like below k[1][4] < -1*10^-10.

k[1][1]==24166.7, k[1][2]==-755.208 , k[1][3]==12083.3 , k[1][4]==-1.52454*10^-10 , k[2][1]==-755.208

I am trying to assign zero β€œ0” to those elements of list which are below a certain values but I am unable to do so using:

For[i = 1, i <= 16,
i++, {If[final[] < -1*10^-10, final[]==0]}];

I have also tried using /. rule operation but it is not working. Is there any way I can do it ?

k[1][4] is part of the list β€œfinal” so when I say final ==0 it gives me : (k[1][4] == -1.52454*10^-10) == 0
which is correct but I need to access the part (K[1][4]) of the list
final which is final[[4]] and I need to assign it zero if it is below a certain value. I hope it is clear what i need ?