### Theory:

A compound's chemical formula is a symbolic representation of its composition. First, we should learn about the symbols and valency of the elements to write a chemical formula of a compound

Let us take, for instance, the comparison between humans and octopuses. Humans have two arms with which they grab things they need.

Likewise, the octopus has eight arms; they can take or hold more compared to humans. Likewise, atoms of different elements have different capacity.
Valency:
Valency is also called the combining capacity of an element. The valency of an element can be used to determine how its atoms can react with the atom(s) of another element to form a chemical compound.
Ozone

Water

If we want to take any material, we use our hands to take it. Similarly, the valency electron in the atoms is readily available to make a chemical reaction with other atoms or compounds.

Ions must be balanced
Rules should be followed to write a chemical formula:
1. The charges ($$+$$, $$-$$) or valency (free electrons) on the ion must be balanced.

2. When writing a compound of metals and non-metal, the symbol of metal should be written first (left side) and followed  by the non-metal compound (right side).
Example:
$$NaCl$$ : Here, Sodium $$Na$$ is the metal so that should be written on the left side, and chlorine $$Cl$$ is a non-metal that should be written right side.
3. Ions should be enclosed in a bracket before writing the number to indicate the ratio.

Let us now we see how to write a chemical formula with some examples to understand it clearly in the next topic.