A 0.01020 mg sample of an unknown compound was found to contain 0.0084 mg of C, and 0.0018 mg of H. It was also determined that the unknown compound had a molecular weight of 58.12 g/mol. What is the molecular formula for this compound?

You really should convert mg to gams BUT that give you so many zeros before the decimal point that it becomes confusing. It's ok to leave them in mg if we do them all the same way.

0.0084/12 = about 7E-4
0.0018/1 = 1.8E-3
Find the ratio of C and H. The easy way to do that is to divide both numbers by the smaller value.
7E-4/7E-4 = 1.00
1.8E-3/7E-4 = 2.6 and I would multiply both by 2 to give C2H5
empirical mass = (2*12 + 5*1) = 29
empirical mass x ?whole number = 58.12
? number = 58.12/29 = 2+ and round to a whole number.
(C2H5)2 = C4H10 = molecular formula.

To determine the molecular formula of the compound, we need to find the number of atoms of each element present in one molecule of the compound.

First, we need to find the number of moles of carbon (C) and hydrogen (H) in the given sample.

Moles of C = mass of C / molar mass of C
Moles of C = 0.0084 mg / (12.01 g/mol)
Moles of C = 7.0 x 10^-7 mol

Moles of H = mass of H / molar mass of H
Moles of H = 0.0018 mg / (1.008 g/mol)
Moles of H = 1.79 x 10^-6 mol

Next, we need to find the molar ratio between C and H. Divide the moles of each element by the smaller number of moles (in this case, moles of C).

Moles of C / Moles of C = 7.0 x 10^-7 mol / 7.0 x 10^-7 mol = 1
Moles of H / Moles of C = 1.79 x 10^-6 mol / 7.0 x 10^-7 mol = 2.56

Now, we need to find the empirical formula of the compound using the molar ratios obtained. Multiply the subscripts by the smallest possible integer to get whole numbers.

Empirical formula = C1H2.56

Lastly, we need to determine the molecular formula by calculating the molecular weight of the empirical formula and comparing it to the given molecular weight of 58.12 g/mol.

Molar mass of empirical formula = (12.01 g/mol) + (2.56 * 1.008 g/mol)
Molar mass of empirical formula ≈ 17.956 g/mol

To find the molecular formula, we divide the molecular weight of the compound (58.12 g/mol) by the molar mass of the empirical formula (17.956 g/mol).

Molecular formula = (58.12 g/mol) / 17.956 g/mol
Molecular formula ≈ 3.23

Since we cannot have a fraction as a subscript in a molecular formula, we need to round it to the nearest whole number.

Therefore, the molecular formula for this compound is C3H8.