Consider aThe following general reaction: 2A ----> B (it's a reversible reaction) This reaction proceeds with decrease in numberamount of molessubstance, so increasing pressure should shift the position of equilibrium to the right.
$$\ce{2 A(g) <=> B(g)}$$
But let's say the forward reaction is endothermic, and both A$\ce{A}$ and B$\ce{B}$ are gases. This means if the position shifts to the right, there will be an increase in temperature and consequently an increase in gas pressure then. Then why will the equilibrium shift towards right side upon increasing the pressure?
Does the effect of pressure on the position of equilibrium depend on whether we have an endothermic or exothermic reaction?