Use a space between a number and an abbreviation of a metric unit, or hyphenate if used as a modifier.
Exception: 6d nail (this is the abbreviation for a 6-penny nail)
Use a space between two initials of a person’s name.
J. P. Doe
Omit the space between initials of a company name.
Omit the spaces between three or more initials of a person’s name.