1. Definition of Subject
Maybe we’ve been heard the word ‘subject’ for all time. For example, in sentences, there must be a subjects, or maybe in science project that refers to the materials that have been research, or even in marketing plan that refers to buyers.
But, this time, I will try to explain subject in sentences. Subject can be defined as the part of a sentence or clause that commonly indicates (a) what it is about, or (b) who or what performs the action (that is, the agent).
The subject is typically a noun, noun phrase, or pronoun. In a declarative sentence, the subject usually appears before the verb (“Gus never smiles”). In an interrogative sentence, the subject usually follows the first part of a verb (“Does Gusever smile?”) .
Other than that, subject can have meaning like this one too, The subject (abbreviated sub or su) is one of the two main constituents of a clause, according to a tradition that can be tracked back to Aristotle. The other constituent is the predicate. In English, subjects govern agreement on the verb or auxiliary verb that carries the main tense of the sentence, as exemplified by the difference in verb forms between he eats and they eat. 
How to Identify the Subject:
“The clearest way of spotting the subject of a sentence is to turn the sentence into a yes-no question (by this we mean a question which can be answered with either ‘yes’ or ‘no’). In English, questions are formed by reversing the order between the subject and the first verb which follows it. Look at the following example:
He can keep a Tamagotchi alive for more than a week.
The appropriate question here if we want a ‘yes’ or ‘no’ as an answer is:
Can he keep a Tamagotchi alive for more than a week?
Here ‘he’ and ‘can’ have changed places and that means that ‘he’ must be the subject in the first sentence. . . .
2. Function of Subject
From definition of subject above, we can tell that subject is the main core of a sentences. It explains what the sentences is about or who did it in sentences. Maybe, sometimes we found sentences like “what’s up?” or maybe “what the hell”, they didn’t have a subject, but that’s a frank language not a formal language that used in daily life because normal language must have a subject, I think :p
3. Forms of Subject
The subject is a noun phrase in the sentence and can be realised by the following forms
- A determinerless noun phrase, also called a bare noun phrase. In English, this is mostly limited to plural noun phrases and noun phrases headed by a mass noun.
Builders are at work.
- A noun phrase introduced by a determiner. This complex (determiner + noun phrase) is usually called a determiner phrase:
The large car stopped outside our house.
- A gerund. These can be shown to behave as noun phrases in many respects, for example, in being able to form determinerless phrases
Eating is a pleasure.
His constant hammering was very annoying.
- An infinitive. These can be shown to behave in many respects as embedded clauses, for example in allowing question words like “who.”
To read is easier than to write.
Whom to hire is a difficult question.
That he had travelled the world was known by everyone.
- A direct quotation:
I love you is often heard these days.
- The subject can also be implied. In the following command, the subject is the implied “you” that is the recipient of the imperative mood.
Take out the trash!
- An expletive. These are words like it or there when they don’t refer to any thing or place. For example in the following sentence “it” doesn’t refer to anything.
- A cataphoric it. This is the use of it when it is co-referent with a subordinate clause that comes after it.
It was known by everyone (that) he had travelled the world. 
Bold word means that’s the subject😀