Using the Gerund
The gerund adds a SECOND action that runs alongside the main verb, and its subject is ALWAYS the same as the main verb’s - it never states its own subject and never agrees with anything. Two everyday jobs. (1) SIMULTANEOUS action (“while doing”): Περπατώντας στον δρόμο, είδα τον φίλο μου (“Walking down the street, I saw my friend”) - the walking and the seeing are the same person, at the same time. (2) MANNER or MEANS (“by doing”): Μαθαίνει διαβάζοντας (“He learns by reading”), Έφυγε τρέχοντας (“He left running”). Because the subject is shared, you cannot use a gerund when the two actions have different subjects - there you need a full clause with όταν/ενώ or a relative. One invariant form, dropped in to colour the main verb with a background “-ing”.
The rule
The gerund adds a second action running alongside the main verb, and its subject is always the main verb's - it never states a subject of its own and never agrees with anything. Two everyday jobs. Simultaneous action, “while doing”: Περπατώντας στον δρόμο, είδα τον φίλο μου. Manner or means, “by doing”: Μαθαίνει διαβάζοντας, Έφυγε τρέχοντας. Because the subject is shared, the gerund is unusable when the two actions have different subjects - there you need a full clause with όταν or ενώ, or a relative. One invariant form per verb (γράφω → γράφοντας, αγαπώ → αγαπώντας), dropped in to colour the main verb with a background “-ing”.