Skip to content

Unexpected negative lower bound for product of positive interval row vector and positive interval vector #761

Description

@ChangheYang1999

Hi, I found a surprising result when multiplying a positive interval row vector by a positive interval vector.

All entries of both vectors are strictly positive intervals, so the resulting dot product should also have a positive lower bound. However, b * a returns an interval with a negative lower bound.

Minimal working example:

using Pkg
using IntervalArithmetic

Pkg.status("IntervalArithmetic")

a = Interval{Float64}[
    interval(77.0713, 645.097),
    interval(59.9388, 282.904),
    interval(3.8025, 6.30973)
]

b = Interval{Float64}[
    interval(2.35903e14, 3.16785e15)  interval(2.36564e14, 1.38742e15)  interval(3.89381e12, 1.68618e13)
]

println(a)
println(b)
println(size(a), " ", size(b))
println(b * a)

bb = vec(b)
s = zero(eltype(a))
for i in eachindex(a)
    s += bb[i] * a[i]
end
println("manual dot = ", s)

On my side, the package version is:

IntervalArithmetic v1.0.9

The output of b * a is:

Interval{Float64}[[-9.28652e+17, 2.43619e+18]_com]

This is surprising because all entries are positive. The expected lower bound should be positive. A direct endpoint estimate gives approximately:

[3.24e16, 2.436e18]

The upper bound agrees with the matrix multiplication result, but the lower bound is much too wide and becomes negative.

I understand that interval matrix multiplication may return an enclosure rather than the tightest possible interval. However, since this is a dot product of positive intervals, I wonder whether this behavior is expected, or whether the matrix multiplication path is using a method that loses sign information too aggressively.

Is this intended behavior in v1.0.9, or could it be a bug / missed optimization in interval matrix-vector multiplication?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions