Medicare part B is legally optional. However if you receive medical insurance through an employer or as retiree, they can require you to have part B coverage. When you first get Social Security you can postpone taking part B (though normally it should be taken), but cancelling and restarting once you have had coverage is costly.