Answer:
Agar is made up of agarose which is a polysaccharide and agaropectin which is a mixture of glucuronic acid and pyruvic acid. It is obtained mainly from red algae like glacilaria.
Agarose present in agar has the property that converts liquid media into solid media. Agarose contains 3,6-anhydro-L-galactopyranose which has 3 equatorial hydrogen atom that force its molecule to form a helix and then these helices interact to form a gel.
Agar is dissolved in water and in other solvent at high temperature nearly 95-100°c. Once the agar is dissolved it get solidified at temperature between 32-40°c. So this is the reason why agar is such a good ingredient for converting liquid media to solid media.