Ива́нович and Ивано́в,they are from the given name Ivan?Ивано́в is a surname,then how about Ива́нович?
Иванович in Сергей Иванович Иванов is a patronymic. Every Russian has got a name, a patronymic and a surname. They are used in all official papers. A patronymic means the son/daughter of and is formed from your father's name: Иванович is Ivan's son,Ивановна is Ivan's daughter.So Сергей Иванович had/has a father whose name was/is Иван.
The endings -ович,-евич,-ич are used to form patronymics for men. For women, the endings are -овна,-евна,-ична.(Петрович,Сергеевич,Ильич,Петровна,Сергеевна,Ильинична)
V.V. forgot to say, what the endings -ович,-евич,-ич beside of patronymic can be surname.
Usually it change stress Ива́нович vs Ивано́вич or Си́дорович vs Сидоро́вич, but not always.
For example Иванович Бранислав:
Брани́слав — name
Ива́нович — surname.
Петрович Борис Петрович:
Борис — name
Петрович — patronymic
Петрович — surname
Russian standard orders are:
[surname] [name] [patronymic]
[surname] [name]
[name] [patronymic]
But Russian also uses English order: [name] [surname] or [name] [patronymic] [surname]
So Александр Иванович is usually [name] [patronymic], but very rarely it can be [name] [surname]