Ikhlas (Sincerity)
Sincerity in obeying Allah is among the obligations of the heart. It is also one of the good characteristics. Sincerity in obeying Allah is doing good deeds for the sake of Allah only. It is not doing them to seek the praise and respect of people. Allah made sincerity a condition for the acceptance of good deeds.

Allah, Ta’ala, said in the Qur’an:
Ayah 110 of Surah Al-Kahf means: “Let the one who believes in the Day of Judgment do good deeds without seeking the praise of the people by doing so.”

The sincere person is the one who performs good deeds be it praying, fasting, Hajj, Zakah, or reciting the Qur’an seeking the reward from Allah, and not for the sake of people praising and mentioning him.

The one who is praying should be performing obedience for the sake of Allah only, not so that the people will say: “So and so prays, he does not miss any obligation.”

Also, the one who is fasting should be fasting for the sake of Allah only. The same applies to, the case of the one who is giving Zakah, sadaqah, reciting the Qur’an, or anyone who is performing a good deed.

The Prophet, sallallahu Alayhi wa Sallam, said:  “Certainly, Allah loves for one of you when performing a deed to perform it properly.”
Someone said: “How is that, O Messenger of Allah?”
He (sallallahu alaihi wasallam) replied: “One does it only for the sake of Allah and according to the rules of the Religion.”
(Narrated by As-Suyutiyy.)

Riya (Insincerity)
Is the opposite of sincerity. It is doing good deeds, such as fasting, for the praise of the people and their admiration.
Insincerity nullifies the reward of the deed. The performer of any deed that is done with insincerity receives no reward, whether it was done for the praise of people only or coupled with seeking the reward. Moreover, such a person commits an enormous sin.

Priding oneself in obeying Allah
After performing certain types of obedience, some people feel conceitedly proud of these actions. They feel they have high status because of performing these actions, forgetting that Allah is the One Who inspired and enabled them to do these good deeds.

Insincerity and priding oneself on obeying Allah are two sins of the heart. They are also two bad characteristics that the pubescent person must avoid. One should be sincere while obeying Allah to earn the reward from Allah.