current has a direction and magnitude, intuitively it should be a vector but my physics textbook describes it as a scalar. Why is that?
It is somewhat like the difference between speed and velocity. Current is defined to be the quantity of charge that flows past a point in a wire per unit time. In many cases the direction of the charge flow changes from one point to another, but the amount of charge passing a given point in a wire is the same at all points. There is a related vector quantity that you will encounter in the more advanced treatments of electricity and magnetism called the current density, usually designated by J. It appears in the differential form of Ampere's law. It is the charge per unit area per unit time in the direction of the charge flow. In a wire, the magnitude of the current density is I/A where A is the cross sectional area of the wire. http://hyperphysics.phy-astr.gsu.edu/hbase/electric/maxeq.html
well, the idea of current involves taking a cross section. To measure a current in a wire, you take a cross section in the wire, and count how many electrons pass through in a given time. However, when one goes beyond the restriction of a wire, let's say in a cloud of electron, current is not so useful now. Let's say I imagine a small circle in the electron cloud, and I measure the charge that pass through in some time and then I calculate the current. Well, if I take a bigger circle, then I will get a bigger number. It becomes award to describe movement of electron charges in this electron using current, since every time I have a current, I need to specify an area. A more serious problem appears when trying to specify the direction of the "current vector". If i rotate the area that i used to calculate current, should the "current vector" rotate with it then? If so, when specifying "current vector", one would have to specify the orientation of the cross area alone with the size of the area. Furthermore, it doesn't make sense to use vector addition in this "current vector". for instance, if I have a "current vector" measured by using an area A, and I want to add another "current vector" with a different area B, how should I proceed? So, to avoid all these complications, physicists use current density, J, and it can be conveniently related to drift velocity of electrons. Imagine we have a whole bunch of electrons, moving in an direction (on average) [tex]\vec{v_d}[/tex] take an area perpendicular to the velocity, and measure the charge that passes in time dt. let n be the electron's density, so charge that passes this cross section is numbers of electrons with a volume of v_d*dt*A, let e be the charge per electron the current would be I=Volume*electron density*charge per electron/time elapsed= [tex](v_d*dt*A)*n*e/dt=n*e*v_d*A[/tex] [tex]I=nev_dA[/tex] notice that if we divide both sides by A, and let J=I/A, the area dependency is removed. for convenience, we can simply let the direction of J be the direction of v_d, Hence, [tex]\vec{J}=ne\vec{v_d}[/tex] a little bit of vector analysis reveals that the current becomes the integral of dot product of v_d and the area vector A.