The answer for this question is sort of lacking, so I thought I'd fill in more thoroughly.
The triangle thingy indicates the item, among the various ones you're considering at the moment, that the game thinks is best. "Considering," in this case, refers to the items that are both in your inventory and the inventory of the container or person you're currently interacting with.
Items that you previously owned or that are in your chest at home, etc., are not factored into the game's assessment. The game's assessment is also purely statistical. That is, it picks the "best" item as the item with the highest relevant stat--for weapons, this is the damage stat; for armor, the armor rating.
Even if you're a sneak build, it'll still think the Dwarven Greatsword is the best, and heavy armor is always listed as better than light armor, unless the light armor in question actually has a better armor rating than the heavy armor.
The game does not assign triangles to items that are not weapons or armor. This includes magical amulets and robes--the former because it's actually not a type of armor, and the latter because of its de facto poor armor rating.
There are further subcategories within weapons and armor within which the game will assign triangles--that is, you'll not just have one triangled weapon and one triangled armor. These are, for weapons and armor respectively, bows, one-handed weapons and two-handed weapons and headwear, bodywear, handwear, and footwear.