When will we use 'a same', instead of 'the same'? Is it grammatical to say:
- We wore a same hat yesterday.
- We talked to a same teacher everyday.
Hardly ever, and your two examples are ungrammatical. Just about the only way same can be preceded by a is in a phrase such as a same day service, where the indefinite article relates to service, and same day is adjectival.
a similar
orthe same
hat - definitelythe same teacher
so no it is not grammatical