The rules are here. They will guide you. But it is still hard to understand. Actually ~하기 and ~함 are slightly different. But I don't explain about it now.
You can just see these rules and examples now. You will forget. Later you can memorize and practice them one by one. I will make their flash cards for you.
Rules
If the word came from chinese, we can just omit the 해요.
- 공부工夫해요 study <= 공부 studying
- 수학 공부 studying math
- 인정認定해요 admit, recognize, concede <= 인정 admission, recognition.
- 동성애자 인정 homosexual recognition
- 교육敎育해요 teach <= 교육 eduaction
- 성인 교육 adult education
But you can use ~하기 too.
- 수학을 공부하기, 동성애자를 인정하기, 성인을 교육하기
You can do the same to some korean words too. They are came from the nouns.
- 사랑 => 사랑해요.
- 자식 사랑 = 자식을 사랑하기 Loving one's children.
- 생각 => 생각해요
- 깊은 생각 deep thought, 깊이 생각하기 to think deeply
We can replaec the word's '다' to 음, 움. +ㅁ. You will learn about 하다/합니다 style at Topic3
- the word come from adjective. We can replace -는 or 은 with -음
- 있는 exist
- => ~가 있음, 있기 (the fact or concept) that ~ be exist
- => 있어요, 있다 exist
- 좋은 good
- =>~가 좋음, 좋기 (the fact or cocept) that A be good
- => 좋아요, 좋다
- 있는 exist
- when the final consonant is ㅂ, we replace the ㅂ + ~다 with ~움
- 아름답다 beautiful
- => ~가 아름다움, 아름답기 the concept that ~ be beautiful
- 어렵다 difficult
- => ~가 어려움, 어렵기 the concept that ~ be difficult
- 아름답다 beautiful
- the word are originally verb, We can replace ~다 with +ㅁ
- 해요, 하다. do => 함, 하기 [doing ~]
- 좋아하다 like => 좋아함, 좋아하기 [to like~]
- 사랑하다 love => 사랑함, 사랑하기 [loving ~]
- 알다, 알아요 know => 앎, 알기 [to know ~]
- 살다, 살아요 live => 삶, 살기 [living ~]
- 지나다, 지나가요 pass => 지남, 지나기 [to pass ~]
- 나오다, 나와요 get out => 나옴, 나오기 [getting out ~]
- ...
But there are ilregulars. They are examples.
- 하고싶다, 하고싶어요 want to => ~하고싶음, 하기 [to want to~]
- 받다, 받아요 get => 받음, 받기 [to get ~]
- 듣다, 들어요 listen => 들음, 듣기 [listening ~]
- 착하다, 착해요 be good => 착함, 착하기 [to be good]
- 넣다, 넣어요 put in => 넣음, 넣기 [putting ~ in ~]
- 중요하다 be important => 중요함, 중요하기 [to be important]
- 굽다 bake, roast => 구움, 굽기 [baking~], [roasting ~]
- 대해요, 대하다 treat, see => 대함, 대하기 [to treat~] [to see ~]