Name the following compound.

Ba3Pb2

I don't really understand since both the elements are metals and usually these bonds occur with a metal and nonmetal or two nonmetals.

What you say is true but this might be a eutectic or something of that sort. At any rate I would name it Tribarium diplumbide

The compound you mentioned, Ba3Pb2, is called barium leadide. It is an example of a binary compound that consists of two different metals: barium (Ba) and lead (Pb). Although it is less common, there are compounds where metals can form a bond with other metals. In these cases, the metal-metal interactions are typically weak and are often described as metallic bonding.

To determine the name of the compound, you can use the rules of chemical nomenclature. For this compound, barium is a Group 2 metal and lead is a Group 14 metal. Group 2 metals are known as alkaline earth metals, while Group 14 metals are known as post-transition metals.

To name the compound, you need to determine the oxidation states of the metals involved. In this case, barium (Ba) has a +2 oxidation state, while lead (Pb) has a +2 oxidation state as well. This means that each of the metals has lost two electrons to form ions with a 2+ charge.

To indicate the ratio of the two elements in the compound, you use the subscripts. The subscript "3" after Ba indicates that there are three barium ions, and the subscript "2" after Pb indicates that there are two lead ions.

Putting it all together, the name of the compound Ba3Pb2 would be "barium leadide."