To find \(\cos \theta\) given that \(\sin \theta = \frac{a}{b}\), we use the Pythagorean identity:
\(\sin^2 \theta + \cos^2 \theta = 1\)
Since \(\sin \theta = \frac{a}{b}\), we have:
\(\sin^2 \theta = \left(\frac{a}{b}\right)^2 = \frac{a^2}{b^2}\)
Substitute this into the Pythagorean identity:
\(\frac{a^2}{b^2} + \cos^2 \theta = 1\)
Now, solve for \(\cos^2 \theta\):
\(\cos^2 \theta = 1 - \frac{a^2}{b^2}\)
Which can be rewritten as:
\(\cos^2 \theta = \frac{b^2 - a^2}{b^2}\)
Taking the square root of both sides, we get:
\(\cos \theta = \frac{\sqrt{b^2 - a^2}}{b}\)
This matches the correct option from the given choices, confirming that the correct answer is:
\(\frac{\sqrt{b^2 - a^2}}{b}\)
Therefore, the correct answer is: \(\frac{\sqrt{b^2 - a^2}}{b}\)