1. The connective -(으)려고
  2.1. Relative clause ending -는
  2.2. Relative clause ending -(으)ㄴ
  2.3. Relative clause ending -(으)ㄹ


1. The connective -(으)려고 : in order to

You have already studied the connective '-(으)러' which is used to express the purpose of the speaker's action. This connective ’-(으)려고’ is also used to indicate the purpose of the speaker (subject)'s action. So, these two connectives are interchangeable. While the connective '-(으)러' is always followed by either '가다’, '오다’ or their compounds such as '들어가다/들어오다', '나가다/나오다' etc., the connective '-(으)려고' can be followed by any verbs. The connective '-(으)려고' is used in the present and past tense of the main verb (final verb), but is never used with the future tense. Tense and negation are expressed in the main verb (final verb).
  안나씨 주려고 이 모자를 샀어요. I bought this hat to give to you.
  왜 일찍 일어났어요 ? Why did you wake up early?
  - 출장을 가려고 일찍 일어났어요. - I woke up early to go on a business trip.
because I have to go on a business trip.
  선물을 사려고 백화점에 갔어요. I went to the department store
  선물을 사러 백화점에 갔어요. in order to buy some gifts.
  한국사람과 이야기하려고 한국어를 공부했어요. I studied Korean in order to talk with Korean people.
  한국사람과 이야기하러 한국어를 공부했어요. (Ungrammatical)
  친구한테 선물하려고 가방을 사요. I buy the bag to give it as a present to my friend.
  친구한테 선물하려고 가방을 샀어요. I bought the bag to give it as a present to my friend.
  친구한테 선물하려고 가방을 사지 않았어. I didn’t buy the bag to give it as a present to my friend.
  친구한테 선물하지 않으려고 가방을 샀어요. (Ungrammatical)
  친구한테 선물하려고 가방을 살 거예요. I'll buy the bag to give it as a present to my friend. (Awkward).
 
2. Relative clause ending
2.1. Relative clause ending -는 ; Present Tense
This ending `-는' is attached to the verb directly and is used in the present tense. Its function is the same as the English relative clause construction.
  (어떤 사람이) 저기 앉아서 담배를 피워요. 그분이 최선생님입니다.
저기 앉아서 담배를 피우는 분이 최선생님입니다.
  한국어를 가르치는 일이 쉽지 않아요. Teaching Korean is not easy.
  요리를 하시는 분이 어머니십니다. That’s my mother who is cooking.
  저기에서 아이스크림을 먹는 사람이 마이클씨예요. That’s Michael who is eating ice cream over there.
  저기서 신문을 보는 사람이 제 친구에요. That’s my friend who is reading the newspaper.
  저기 걸어가는 사람이 누구에요 ? Do you know the man who is walking over there?
2.2. Relative clause ending -(으)ㄴ ; Past Tense
This ending `-(으)ㄴ' is attached to the verb directly and is used in the past tense. Its function is the same as the English relative clause 'which (past tense verb)’.
'-ㄴ' is used after verb stems ending in a vowel and ‘-(으)ㄴ’ is used after verb stems ending in a consonant.
  어제 안 사람이 누구에요 ? Do you know who did not come yesterday?
  이 책을 분이 제 형님입니다. The person who gave me this book is my older brother.
  편지를 보낸 분이 누구인지 아세요 ? Do you know the man who sent this letter?
  미국에서 친구가 내일 만나자고 했어요. He asked to meet my friend who came from America.
  어제 먹 한국 음식이 어땠어요 ? How was the Korean food which you ate yesterday?

In addition, this ending can be attached directly to of adjectives in present tense sentences. The forms that you have already studied such as '예쁜, 좋은, 아름다운, 바쁜, 아픈 etc.' are the present inflected forms of the adjectives '예쁘다, 좋다, 아름답다, 바쁘다, 아프다 etc.' Construction of the past form of the adjectives will be dealt with later in detail.
  저기 예쁜 모자를 쓴 분이 제 어머니입니다. That is my mother who is wearing a pretty hat over there.
  날씨가 좋은 날은 산책을 하고 싶어요. I would like to take a walk when the weather is good.
2.3. Relative clause ending -(으)ㄹ ; Future Tense
This ending `-(으)ㄹ' is attached to the verb directly and is used in the future tense. Its function is the same as the English relative clause `which will -'.
  내일 떠날 사람이 누구에요 ? Do you know who is going to leave?
  갈 사람은 가고, 올 사람은 오세요. Those who are going to go, please go, those who are going to come, please come.
  생일 파티에서 입을 옷을 사야 해요. I have to buy the clothes that I will put on at the birthday party.
  다음 주에 공부할 것을 미리 알려 주었으면 좋겠어요. Please let me know beforehand what we will study next week.

The past and future forms of -ㄴ /은, -ㄹ/을 are chosen according to the form of the verb stem.
-ㄴ/-ㄹ are used when the verb ends in a vowel :
가(다) 간 / 갈
공부하(다) 공부한 / 공부할
-은/을 are used when the verb ends in a consonant :
먹(다) 먹은 / 먹을
좋(다) 좋은 / 좋을