what is the difference between 合う and 正しい？


I know that both can mean "correct". I frequently hear things like "合ってる？" to
mean :"is it right?" I don't know much about the use of 正しい, but I know that
it's also a common word for "correct".

What would be the difference between the two? Is there a preference for one
over the other in certain situations and formality levels?




I understand your question is "what is the difference between 合う and 正しい？" as
is said by Aeon Akechi.

**合う** means basically **A is equal to B** or **A and B are equal**. So if it
is used like "あなたの答｛こた｝えは合っている", the phrase means "your answer is equal to the
correct answer".  
On the other hand **正しい** means basically " **right** " along with the meaning
of " **correct** ".

So, 正 in 正しい is used in both ways.  
For example, 正解{せいかい} means a correct answer, while 正義｛せいぎ｝ means justice,
right or righteousness.

