'mat-toolbar' is not a known element - Angular 5

That's because you have to import a module to the module which contains the component declaration, not into the component itself:

app.module.ts

import { MaterialModule } from './material.module';

@NgModule({
  imports: [
    // ...
    MaterialModule
  ],
  declarations: [
    MyCoolComponent,
    // ...
  ]
})

P.S. The correct way to use a material icon is to use the MatIcon component. Example usage:

<mat-icon>home</mat-icon>

Best way
for a quick good fix

import {MatToolbarModule} from '@angular/material/toolbar'; 

in your app.module.ts

then declare MatToolbarModule in your declarations[].