知己知彼
zhī jǐ zhī bǐ
Literally: “know yourself, know the other”
Understand both yourself and your opponent before you act.
English has a similar saying: know your enemy and know yourself
Background
From Sunzi's The Art of War: “Know the enemy and know yourself, and in a hundred battles you will never be in danger.” Sunzi's order is 知彼知己; people today usually say 知己知彼,百战不殆.
Source: The Art of War (Sunzi Bingfa)
How to use 知己知彼
Used for competitions, exams, interviews, business and sports. Usually followed by 百战不殆 (safe in a hundred battles). Slightly formal.
Example sentences
比赛前我们研究了对手的录像,知己知彼才能赢。
Bǐ sài qián wǒ men yán jiū le duì shǒu de lù xiàng, zhī jǐ zhī bǐ cái néng yíng.
Before the game we studied videos of our opponents — you have to know both sides to win.
面试前先了解这家公司,知己知彼,百战不殆。
Miàn shì qián xiān liǎo jiě zhè jiā gōng sī, zhī jǐ zhī bǐ, bǎi zhàn bù dài.
Learn about the company before the interview — know yourself and know them, and you can't go wrong.