Considering the elements B, AI, Mg, and K, the correct order of their metallic character is:
K > Mg > Al > B
The metallic character of an element depends on how readily it can lose its electrons and we can observe that:
On moving down a group, the atomic size increases and the nuclear charge also increases.The effect of an increased atomic size is greater as compared to the increased nuclear charge.Therefore, metallic nature increases as one moves down a group i.e., they can loose electrons easily.
On moving across a period, nuclear pull increases due to the increase in atomic number and thus the atomic size decreases. Hence, elements cannot loose electrons easily.Therefore, the metallic nature decreases across a period moving from left to right.
Let's write electronic configuration of all elements:
B→1s22s22p1 [Period 2]
Al→1s22s22p63s23p1 [Period 3]
Mg→1s22s22p63s2 [Period 3]
K→1s22s22p6 3s23p64s1 [Period 4]
So, K will be highest [Down the group ↑]
Between Al and Mg Mg > Al [Across the period ↓]
B will be least [Down the group ↑]
Therefore,
K > Mg > Al > B [Metallic Character]