How do you know the state of an element or compound when writing chemical equations?

Unless otherwise known, assume the state of the element at room temp. Here is the real problem. For aqueous compounds, ie, compounds dissolved in water, you have to have that given. There is a big difference between NaCl (s) and NaCl (aq).Most common acids are in water, for instance HCl, H2SO4, HNO3. These are written HCl (aq). For products, often the product is not soluble in water, and it precipates...you will learn this later, anyway, here is an example:

NaCl (aq, saturated) + HCl (aq, conc)>>NaCl (s) + HCl (aq) + NaCl (aq, sat)

notice how some of the salt changes to a solid? Neat trick, your teacher may demonstrate this to your class some day, I hope so.

I will expand a little on the previous answer you have been given by Anonymous. His explanation is ok for compounds. Your question also covered elements and his answer is to take the state at room temperature. But what is that state? I will expand on that. If you have a periodic table handy, take a look at those elements listed. Almost all elements are solid at room temperature. The solid elements on my table are listed in black. There are a few exeptions. There are two liquids, shown in blue on my table, Br and Hg. There are 11 gases, shown in red on my table. H2, F2, Cl2, N2, O2, He, Ne, Ar, Kr, Xe. and Rn. So if you know the six inert gases and the other five gases plus the two liquids, everything else is solid. Some may argue that Fr, Cs, and Ga (shown on my table the same color as Br and Hg as liquids) are liquids but Ga has a melting point of 29.8, Fr has a m.p. of 27, and Cs has a m.p. of 28.4. A room temperature of 25 degrees C is 77 degrees F and these are higher than that. (The lowest of 27 corresponds to 80.6 degrees F.) I don't call that a compfortable room temperature and I don't consider them liquids. In addition to that, I think only a few atoms of Fr have been produced so that really isn't an issue. I hope this is useful.

To determine the state of an element or compound when writing chemical equations, there are a few general rules to follow:

1. Elements: Most elements are solid at room temperature. Exceptions include the elements Bromine (Br) and Mercury (Hg), which are liquid, and the gases Hydrogen (H2), Fluorine (F2), Chlorine (Cl2), Nitrogen (N2), Oxygen (O2), Helium (He), Neon (Ne), Argon (Ar), Krypton (Kr), Xenon (Xe), and Radon (Rn).

2. Compounds: Unless otherwise specified, compounds are assumed to be in their standard state at room temperature. The standard state for most compounds is solid. For example, NaCl (s) represents solid sodium chloride. However, for compounds dissolved or mixed in water (aqueous solutions), the state is denoted as (aq). For example, HCl (aq) represents hydrochloric acid dissolved in water.

3. Precipitation reactions: Sometimes, when two aqueous solutions are mixed, a solid product may form. In such cases, the solid product is indicated in the equation. For example, in the equation NaCl (aq, saturated) + HCl (aq, conc) >> NaCl (s) + HCl (aq) + NaCl (aq, sat), the saturation of NaCl in the aqueous solution causes it to precipitate and form a solid.

It's important to note that these conventions are generally followed, but there may be exceptions or specific instructions given in certain cases. Always refer to the provided information or consult your teacher or a reliable resource to determine the correct state of an element or compound when writing chemical equations.