How can a product of Bra and Ket be a scalar if they are matrices? I am trying to teach myself Quantum Mechanics and am currently on Complex Vector Space Arithmetic. According to Wikipedia, product of a Bra and Ket is a scalar (which, I think, means a complex number). But then, on the same page, it also says that both Bras and Kets can be represented by 1xN and Nx1 matrices respectively.
The product of to such matrices should be a 1x1 matrix, not a scalar as answered here. My questions are:


*

*Can we really represent Bras and Kets by matrices in multiplication, or is this just a analogy taken too far? If yes,

*can we reliably replace a 1x1 matrix by a scalar is every situation? Or is it a shortcut applicable only in some contexts?

*If it is not universally applicable, where can we do this replacement and why?

 A: This may seem naive, but as an engineer used to visualizing things, I always understand the multiplication of vectors and matrices as in this diagram:

In order to multiply two matrices AB, A has to have as many columns as B has rows,
and the result has as many rows as A, and as many columns as B.
You get each element of the result by multiplying corresponding cells and adding them up.
If A and B are vectors, one has to be a row and the other one a column.
If you want to multiply them to get a single number, that is the DOT or INNER product, which is where you multiply the row by the column, and they have to be the same length.
Alternatively, you can multiply them to get a matrix, which is the TENSOR or OUTER product.
That is where you multiply the column by the row, and they don't have to be the same length.
A: This is a good question---from the logical point of view, a scalar is not an object of the same "type" as the one by one matrix you can make from it.  (I have just spent hours trying to compile someone else's code which won't compile because of similar type errors.)  
From the physical point of view, there is no difference if they both can be used for the same purposes.  Which they can, in this context.
As far as I know, they can always be replaced by each other in every context I can think of in physics.
The "purpose" of a matrix is to describe a linear transformation on a space.  A scalar always does act on a space, or it wouldn't be called a "scalar", it would just be called a "number".  Usually, the matrix coefficients change if you change the coordinate basis on the space.  But the matrix coefficient of a scalar never changes no matter how much you change the coordinates.  So they are coordinate-independent, just like numbers are.  
To enlarge on this pedantic point a little, a scalar is not quite the same as a number.  We only call a number a "scalar" if we are thinking of it in connection with a vector space it acts on,, as a linear transformation.  So, if you accept this common usage distinction between "scalar" and "number", the one-by-one matrix IS exactly the same type of thing as a scalar, but is not the same type of thing as a number.  The real sloppiness, which is harmless, is to think scalar=number.  If you accept this distinction, then there is no sloppiness, even logically, in saying the product of those two vectors is a "scalar".  And that is why it is called the "scalar product".  But it is not exactly a number (if you accept this distinction).
A: The can be represented by matrices, yes. That doesn't mean they are matrices, though. Matrices aren't really very meaningful mathematical objects, they just provide a handy way of specifying linear operators on paper or in computer programs.
In case of Bra-Ket, the situation is actually this: you have a Hilbert Space $\mathcal{H}$, which contains certain vectors/states. These are usually taken to be the Kets. Though the distinction is commonly smeared, a vector is not an array or 1-column matrix of numbers, but an abstract mathematical entity. IMO it's best to think of it as a point in a hypersurface (the Hilbert space). Only if you expand a vector to coefficients with respect to some specific basis, then you get an array of numbers.
The Bras belong to the dual space $\mathcal{H}^\ast$, which is the space of all linear functionals $\mathcal{H}\to\mathbb{C}$. Hence, a product of a Bra and a Ket is really just the result of applying a Bra-function to a Ket-argument, and because the codomain of the Bras is the set of complex numbers (i.e. of scalars), the product does not give any sort of matrix but just, well, a single scalar.
Now, because of a nice (and actually not so trivial) mathematical theorem, the space of linear functionals is actually isomorphic to the Hilbert space itself. That's why the symmetric notation of Bras and Kets makes sense: we don't actually need to worry about which are vectors and which are co-vectors, and both can be thought of as differently-shaped matrices. But I don't think it's really clever to see it this way, though it is of course good to know you can.
A: Let's talk about the vector space $\mathbb{R}^n$, without the bra-ket formalism. Let $\mathbf{e}_i$ denote the vector with $j$th component $\delta_{ij}$, which is $1$ for $i=j$ or $0$ for $i\neq j$. These form a basis, viz. $\mathbf{v}=\sum_{i=1}^n v_i\mathbf{e}_i$. The linear maps from this vector space to $\mathbb{R}$ form a vector space called the dual space of $\mathbb{R}^n$. We can construct a basis of this space too; our $i$th basis element, say $\mathbb{e}_i^\dagger$, will send $\mathbb{e}_j$ to $\delta_{ij}$. I now have a binary operator which takes an element from each vector space, then makes the element of $\mathbb{R}^n$ the argument of the function taken from the dual space. We write $\mathbb{e}_i^\dagger\mathbb{e}_j=\delta_{ij}$. But now I may as well associate each $\mathbb{e}_i$ with $\mathbb{e}_i^\dagger$ and think of this as a bilinear functional on $\mathbb{R}^n$. It is, of course, the familiar dot product, viz. $\left(\sum_i u_i \mathbb{e_i^\dagger}\right)\left(\sum_j v_j\mathbb{e_j}\right)=\sum_{ij}u_i\delta_{ij}v_j=\sum_i u_i v_i.$ And you can do much the same for $\mathbb{C}^n$, only now our inner product conjugates the $u_i$.
So much for how inner products work. Next we need outer products, which are of the form $\sum_{ij}a_{ij}\mathbf{e}_i \mathbf{e}_j^\dagger$. These are linear maps that can take a vector from either space, as long as you put it on the correct side so as to form an inner product. These outer products are just matrices. As an example, if $I:=\sum_i\mathbf{e}_i \mathbf{e}_i^\dagger$ then $I\mathbf{v}=\mathbf{v},\,\mathbf{v}^\dagger I=\mathbf{v}$. So $I$ is the identity matrix! (Note we obtain this with the choice $a_{ij}=\delta_{ij}$.) The inner product of two vectors is obtainable by placing a vector each side of the outer product, viz. $\mathbf{u}^\dagger\mathbf{v}=\mathbf{u}^\dagger I \mathbf{v}$. (As an exercise, you may wish to find which matrices can replace $I$ to still give a function that satisfies the inner product axioms.)
Quantum mechanics looks a bit more complicated, but these principles will apply to any vector space. Sure, you might use a bra-ket notation, or have to integrate over a label instead of summing over it. (That leads to some funny complications.) But the explanation for your textbook's comment is the inner/outer product distinction.
A: This is just the dot product of two vectors.  If you want to get more into dot products I would suggest migrating to the math site.
A: bra is a vector and shows state of your favorite system.we know a vector can be shown as a $N*1$ matrix, so a let is a matrix
Changing a vector column and line give us transpose and its bra
A: The bra and the ket are represented by vectors.  This does not make them vectors.  As you say earlier, their product is defined to be a scalar.  Don't confuse the representations with the things.
This also happens to students studying linear algebra.  At first they conflate the linear operators with the matrices full of numbers.  The linear operators are unchanged by change of coordinates (change of basis), but the matrices change substantially.  In this case, students believe (incorrectly) that a change of basis changes the linear operators -- it does not.
Likewise, the bras and kets are objects in some abstract space.  They can be represented as vectors, which are also matrices (if one index ranges only over the set $\{1\}$).  They are neither vectors nor matrices.  If we change bases in that space, the vectors and matrices change, but the bras and kets stand unchanged.  Don't conflate the object with the representation.
You observe that the inner product of a vector representing a bra and a vector representing a ket (one of which, actually, should be a co-vector, but this is not your question) is a single entry vector or single-entry matrix (all indices now range over the set $\{1\}$).  From the above, it should be no surprise that this small matrix represents the scalar that is the product of the (genuine) bra and ket.  Again, these are "two layers" of stuff -- the actual bras, kets, and scalars, and their representations as matrices and vectors.  Don't conflate the two layers.
