Issue 1:
Broken on both release-0.3 and 0.4-dev:

julia> [1 1; 1 1] .* [1, 1]
2x2 Array{Int64,2}:
1 1
1 1

julia> sparse([1 1; 1 1]) .* [1, 1]
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:568
in .* at sparse/sparsematrix.jl:669

julia> [1, 1] .* [1 1; 1 1]
2x2 Array{Int64,2}:
1 1
1 1

julia> [1, 1] .* sparse([1 1; 1 1])
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:568
in .* at sparse/sparsematrix.jl:670

I'm pretty sure this worked as of v0.2.

Issue 2:
I'm fiddling with sparse matrices and have found a few quirks :-)

What I pretend to do is use LU factorization in sparse matrices (for now in real matrices, but I hope to get it done also in sparse complex matrices)

First, in the manual, in the Linear Algebra section (http://docs.julialang.org/en/release-0.3/stdlib/linalg/) there is the relation between the L and U factors (in the case of F=lufact(A) operation they are named/extracted as F[:L] and F[:U] ) and a line and column permutation of the factorized sparse matrix A that reads as

F[:L] * F[:U] == Rs .* A[F[:p], F[:q]]

It seems to me (according to the explanation in that section) that it should read as

F[:L] * F[:U] == F[:Rs] .* A[F[:p], F[:q]]

because Rs doesn't exist per se (it has to be extracted from the object F, and so is F[:Rs]).

Aside that typo, additionally the RHS of that expression when evaluated gives an error due to a mismatch in dimensions. Indeed there is not a perfect equivalence/behavior of the .* operator (this doesn't happen with the .+ operator, for example) in real and in complex matrices, as the session below clearly shows. I end that session with an example of the failure, by applying lufact() and exemplifying the error.

I checked the code around "sparse/sparsematrix.jl:531" where the error is triggered and there is a check of conformant dimensions for matrix dot product .* (and of other operators)

.............
if size(A,1) != size(B,1) || size(A,2) != size(B,2)
throw(DimensionMismatch("")) # line 531 of the source code
end
...............

(where A and B are the operands) which means that the .* operator only accepts operands with the same dimensions. I think that it is what triggers the error.

But then this configures a different behavior for .* in sparse and non sparse matrix representations.

Below is a session with julia 0.3.0 running in windows 7 in AMD 8-core Piledriver processor where the above cases are visible, with added comments. I experimented in julia 0.2.1 in Linux-Ubuntu (over Virtualbox) and the behavior of .* is the same as in windows 7; however, in 0.2.1 lufact() is not implemented for sparses, so I could not check it.

# H and v are a matrix and a vector, Hs and vs the corresponding sparse objects.

julia> H=[1 0; 2 -1.0]
2x2 Array{Float64,2}:
1.0 0.0
2.0 -1.0

julia> v=[2,3.0]
2-element Array{Float64,1}:
2.0
3.0

julia> Hs=sparse(H)
2x2 sparse matrix with 3 Float64 entries:
[1, 1] = 1.0
[2, 1] = 2.0
[2, 2] = -1.0

julia> vs=sparse(v)
2x1 sparse matrix with 2 Float64 entries:
[1, 1] = 2.0
[2, 1] = 3.0

julia> v .* H
2x2 Array{Float64,2}:
2.0 0.0
6.0 -3.0

julia> v .* Hs
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:531

julia> vs .* H
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:531

julia> vs .* Hs
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:531

# product * is OK

julia> H * Hs
2x2 Array{Float64,2}:
1.0 0.0
0.0 1.0

julia> Hs * H
2x2 Array{Float64,2}:
1.0 0.0
0.0 1.0

# does difference in sizes of v and vs explain something?

julia> size(H)
(2,2)

julia> size(Hs)
(2,2)

julia> size(v)
(2,)

julia> size(vs)
(2,1)

## the .+ operator is OK with mismatch in operand dimensions (sparse or not)

julia> v .+ H
2x2 Array{Float64,2}:
3.0 2.0
5.0 2.0

julia> v .+ Hs
2x2 Array{Float64,2}:
3.0 2.0
5.0 2.0

julia> vs .+ H
2x2 Array{Float64,2}:
3.0 2.0
5.0 2.0

julia> vs .+ Hs
2x2 Array{Float64,2}:
3.0 2.0
5.0 2.0

# for conformant sparse operands is OK

julia> Hs .* Hs
2x2 sparse matrix with 3 Float64 entries:
[1, 1] = 1.0
[2, 1] = 4.0
[2, 2] = 1.0

# now we lufact(Hs) and show the problem with F[:Rs] .* A[F[:p], F[:q]]

julia> S=lufact(Hs)
UMFPACK LU Factorization of a 2-by-2 sparse matrix
Ptr{Void} @0x0000000020c65560

julia> S[:L]
2x2 sparse matrix with 2 Float64 entries:
[1, 1] = 1.0
[2, 2] = 1.0

julia> S[:U]
2x2 sparse matrix with 3 Float64 entries:
[1, 1] = -0.333333
[1, 2] = 0.666667
[2, 2] = 1.0

julia> S[:p]
2-element Array{Int64,1}:
2
1

julia> S[:q]
2-element Array{Int64,1}:
2
1

julia> S[:Rs]
2-element Array{Float64,1}:
1.0
0.333333

julia> Hsperm=Hs[S[:p],S[:q]]
2x2 sparse matrix with 3 Float64 entries:
[1, 1] = -1.0
[1, 2] = 2.0
[2, 2] = 1.0

julia> S[:Rs] .* Hsperm
ERROR: DimensionMismatch("")
in .* at sparse/sparsematrix.jl:531